Improved parsing of connection options

The code is based on conninfo_parse from the C version of pq. I've included additional test cases.

This also slightly changes the semantics of Open to return an error if the connection string cannot be parsed instead of panicking.

Sorry for the mess with the revisions. My git-fu is a little bit lacking.

Fixes #132