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.
(optional)

you'll want this newline here to be consistent with the rest of the parts of this function