Serialize postgres' hstor, json and array types correctly in AR update methods. Fixes #12261