Don't die on trailing whitespace in a connection string

Currently, if you give pq a connection string with a trailing whitespace, pq likes to die with the confusing message `pq: invalid option: ""`

This patch just trims whitespace around the connection string so that when parseOptions splits on " ", it doesn't get a spurious empty option.

Includes a simple test.