Removed static allocations from methods in `output_pgsql_t`.
Don't need extern any more.
Add very simple escaping test.
Reserve correct amount of space for pgsql escaping.
Merge remote-tracking branch 'MapQuest/kk_multiback' into mla_multi_backend
Don't use `const osmid_t &`.

The `osmid_t` is (probably) an 8-byte value, and a reference is
(probably) also an 8-byte value on most modern machines, so it
doesn't save us anything and adds an extra dereference.
Removed statics from `output_gazetteer_t`.
turn tagtransfrom into a proper object for use within output-pgsql as a member. add constness as much as possble to make clearer what changes and what doesnt within a given function