Update gpgsql queries

fixes #927
gpsqlbackend: don't append empty dbname=/user= values to connect string
geobackend: fix possible nullptr deref
Fix zone2{sql,json} exit codes

To be consistent with general practice, fix zone2{sql,json} to exit
with:
 * 0 on success
 * 1 on error

This also moves the catch block after the last line of main, so a
"theoretically" possible exception in ::arg().mustDo would get caught.
(Also, one level less of indent!)
Merge pull request #1159 from mind04/auth-3.3.1

Final set of auth-3.3.1 suggestions