remove call-time pass by reference

...which is no longer supported starting with php 5.4.4.
update postgres functions for 9.x migration

Some inaccuracies/ambiguities are no longer valid starting with 9.0.
This patch corrects them.
php5.4: get rid of magic_quotes

... as they have been completely removed from the language now.
php5.4: cast pgsql results to integers to avoid PHP warnings
Merge pull request #3 from mfournier/php-5.4

Php 5.4