Support data type adapters

This allows custom types to be (de)serialized into a standard JDBC type or
to support db-specific data types, like the Postgres json and xml types.