Handle more disconnect errors when using the postgres adapter with the postgres-pr driver

Also, swallow an error that can occur when disconnecting.
Hex escape blob input on MySQL

This doesn't appear to be necessary on the MySQL side, but if you
mix utf-8 input strings and blobs in the same string on ruby 1.9+,
you can end up with encoding errors on the ruby side.  Hex encoding
the blobs can work around that, and doesn't appear to cause an harm
other than bloating the SQL string used.  Performance sensitive
code should be using prepared statements for large blob input
anyway, so that doesn't seem like a major downside.