Add support for Postgresql JSONB

This is the updated version of #15195 and #15950 by @pcreux and @chris-teague.

It is tested against postgresql-9.4beta.

Test cases shared between json and jsonb are extracted to a module called `PostgresqlJSONSharedTestCases`. I made my best to minimise the amount of lines impacted by this extraction.
Yes. Though IMO it's better to go with a more obviously-correct `super(raw_old_value, new_value)` in situations like this.