fix: use CAST(... AS CHAR) for MySQL search queries
MySQL doesn't support CAST(... AS TEXT), which caused 500 errors
on the /search endpoint in production. Use dialect detection to
select CHAR for MySQL and TEXT for SQLite.
Add data-layer search tests for both SQLite (default) and MySQL
(behind //go:build mysql tag) covering title, URL, tag, ordering,
and error preview exclusion logic.