Added PK ordering support for Postgres.
Moved PK logic to CommonSQL base class.
Added PK ordering for SQLite.
Added tests for SQLite PK ordering.