Fixed incorrect char encoding when generating search documents
This fixes two UTF-8 issues when generating search documents:
- When generating search documents tripod was applying utf8_encode() to all values, but this assumes the input to be ISO-8859-1, and can garble non-ASCII-range characters from other char encodings, including UTF-8 itself.
- The search indices were being passed through strtolower(), which does not respect non-ASCII characters, modified this to use mb_strtolower().