Fix postgres tests + bug with PK value retrieval on insert

See #261.

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 the described problem was only fixed for MySQL. I have strong doubts the postgres tests were run ever since few ZF1 mayor version releases.

According to travis results: https://travis-ci.org/OndraM/zf1/builds/17196153, the remaining errors in the database tests are from MySQL and mainly SQLite.