Makes encoding an optional parameter
Changing to client_encoding, adding test for creating a connection
Uses val function instead
Client encoding in defaults as well
Merge pull request #370 from badave/master

Makes client_encoding configurable and optional