IOException for setBinaryStream

If there is an IOException for the input stream specified in a setBinaryStream method call for a prepared statement, improper cleanup of the connection may result in an error for the subsequent command.

This issue concerns CR #343354.