Add dboptions config option and change deprecated call to PQsetdbLogin

Removed the deprecated use of PQsetdbLogin and replaced it with PQconnectdb. A new config option dboptions was also added in order to support more functionality from postgresql.
The spacing here is wrong. You should commit a fix directly to master.