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.