Add PG::TypeMapByMriType for encoding of Ruby values.
Remove unnecessary variable.
Replace some Check_Type/DATA_PTR combinations by Data_Get_Struct.