Close resources and use JDBC 3 API when possible when working with LOBs

See discussion here: https://github.com/liquibase/liquibase/pull/190#issuecomment-26967024