Fix problem with explicit transactions and ErrBadConn

Because database/sql ignores ErrBadConn from all *Tx methods, a bad
connection might have been put back into the pool thinking it's in a
transaction.  This connection would then on the next call to Begin()
return the error "pq: unexpected transaction status in a failed
transaction", and then be put back into the pool, again.  With bad
enough luck the pool might get filled with these connections, and the
application wouldn't be able to start any transactions, effectively
rendering it useless :-(

To fix, we have no option other than to remember when a connection is
bad, and return ErrBadConn for such connections from any method
database/sql might call.
Mark the connection bad if the server responds with something unexpected

Commit 07745050691bbe88ce770ca38311c19be9445e37 allows us to return an
error message while still marking the connection bad.  Use that to our
advantage in cases where the protocol state appears to be out of sync.
This way the user still sees the specific error message (and hopefully
we'll see a bug report), but we avoid putting bad connections into the
pool thinking they're still A-ok.