Fix potential thread-safety issues on PostgreSQL on non-GVL rubies
Fix potential thread-safety issues on PostgreSQL on non-GVL rubies

Similar to previous changes in the general library, this makes
the shared postgres adapter require synchronization for the
@primary_keys and @primary_key_sequences hashes for
Database instances, since multiple threads could potentially
attempt to update them concurrently.

chef/sequel,dennis-d/custom_sequel,pfarrell/sequel,gferguson-gd/sequel,reubano/sequel,seeARMS/sequel,uhoh-itsmaciek/sequel,knut2/sequel,dennis-d/custom_sequel,nju520/sequel,davidbegin/sequel,Marketcircle/sequel,reubano/sequel,mpalmer/sequel,uhoh-itsmaciek/sequel,nicohvi/sequel,offshore-safety/sequel,freshpay/sequel,yazshel/sequel,freshpay/sequel,offshore-safety/sequel,mpalmer/sequel,gferguson-gd/sequel,pfarrell/sequel,beni55/sequel,t-morgan/sequel,knut2/sequel,beni55/sequel,nicohvi/sequel,offshore-safety/sequel,nju520/sequel,yazshel/sequel,seeARMS/sequel,t-morgan/sequel,bigfix/sequel,davidbegin/sequel