Add support for PostgreSQL 9.2+'s native json type.

The patch keeps things portable by still returning 'text' for unsupported databases/versions.