Fix a couple issues on PostgreSQL with array columns

This is a combination of 3 commits:

--- 56510091fb8d178ec7c2391bed9fbdb9e3a54287

Do not consider PG array columns as number or text columns

The code uses these checks in several places to know what to do with a
particular column, for instance AR attribute query methods has a branch
like this:

    if column.number?
      !value.zero?
    end

This should never be true for array columns, since it would be the same
as running [].zero?, which results in a NoMethodError exception.

Fixing this by ensuring that array columns in PostgreSQL never return
true for number?/text? checks.

Since most of the array support was based on the postgres_ext lib, it's
worth noting it does the same thing for numeric array columns too:

https://github.com/dockyard/postgres_ext/blob/v1.0.0/lib/postgres_ext/active_record/connection_adapters/postgres_adapter.rb#L72

This extended the same logic for text columns to ensure consistency.

--- 73bba4c1e1f7fa23aa1a126971338d94ae42398f

Serialize postgres' hstore, json and array types correctly in AR update methods.

Fixes #12261. Closes #12395.

--- 9e1740af9c1a00980b30c66aba3c223c33e646e4

Tidy up fix for PG extensions quoting

Always pass in the column for quote_bound_value and quote using it in
case it exists there.