Create pgsql row encoding and decoding functions in z_db_pgsql

This also deals with the serialized props column there.