Fix postgres tests + PK retrieval on insert

See #5510.

This PR fixes all errors in postgres-specific tests failing after the tests were enabled.

More, the tests also uncovered an real issue in Zend_Db_Table_Abstract::insert() on RDBMS that uses sequences instead of auto increment. This issue is in fact http://framework.zend.com/issues/browse/ZF-3837, but IMO it only fixes the mentioned problem for MySQL. I have strong doubts the postgres tests were run ever since few ZF1 mayor version releases.

According to https://travis-ci.org/OndraM/zf1/jobs/17195849 results, the remaining errors in the database tests are from MySQL and mainly SQLite.