Add support for JDBC 4.1.

This will allow jdbcdslog to compile under JDK 1.7+.

Also fixed a few NPEs.