Added region sequencing of primary keys for Postgres.

Skip setting sequence on a table create if the value is 0 since it will start the first value at 1 anyway.
This fixes the PG error 'setval: value 0 is out of bounds for sequence vms_id_seq...' encountered when migrating a new DB.

BugzID: 15452,9772,13475,16850
fix set_pk_sequence and add a test for it.
remove unused and untested API