Handle batch submission of queries with incompatible encodings

We've experienced an error where a query with a BLOB, encoded as
ASCII-8BIT is concatenated to a UTF-8 query (with UTF-8 multibyte
characters present). This is an invalid conversion and raises an
EncodingError. This commit rescues that error and forcibly converts
the second query to the first's encoding.