Bug 1091643 - Add test for truncated test name bug searches
Bug 1091643 - Add tests for SQL LIKE escaping of search_term

Test that we are treating the search term literally in the LIKE
statement, and so have correctly escaped any underscores, percent signs
or escape symbols.
Bug 1091643 - Switch bugscache queries from full-text search to LIKE

Since full-text searches miss cases where the search term was truncated,
but is still a substring of the bug summary.

When using LIKE, any underscores or percent signs will be treated as
wildcards, so we need to escape them, as well as the escape symbol
itself, so the search term is handled literally. A custom escape
symbol is used since the default of backslash leads to less readable
code, given it has to be double escaped.