Catch UnicodeDecodeErrors in slow query logging.

Just an interim fix to keep this from breaking stuff while we investigate the
underlying issue.