PostgreSQL tests

I started to add tests for PostgreSQL and already fixed some issues. Though, some tests still fail. From my point of view, it is not safe to use PostgreSQL at the moment.  
At first I didn't feel comfortable with this change, neither. But as far as I can see, ``$key`` will only hold variable names ``id``, ``principaluri``, ``displayname``, ``uri``, ``description``, ``synctoken``. (see ``addressbook`` table in schema). I am pretty sure that those field names are unlikely to collide with reserved names from any sql dialect.

Also, as far as I can see, using `` ` `` isn't a pattern that is used consistently throughout the code base. So using it here won't add benefits.