handle invalid connections in a consistent way for all exported methods requiring them

Some cases slipped through the cracks last time.
This handles all of them - with `driver.ErrBadConn` being returned in every single case and logging everywhere except for `Close`.
Maybe some of these even caused `sql/database/driver` to not see that a connection is closed.