JDBC parameter binding uses JDBC 3.0 ParameterMetaData (if available) for type determination

In sync with 3.2.1 now, containing minor modifications for defensiveness against the JDBC driver.

Issue: SPR-10084