Remove PG's definition of `type_cast`

All cases except for `nil` in an array have been removed. `nil` in an
array is handled by the Array type object.
Don't rely on the sql type to quote XML columns in PG
Merge pull request #16072 from sgrif/sg-xml-quoting

Don't rely on the sql type to quote XML columns in PG
Merge pull request #16071 from sgrif/sg-pg-type-cast

Remove PG's definition of `type_cast`