Fix the basic connection with server

Fixed or added comments regarding the startup queries that are made about client encoding, system version, etc. in `connection.c`. Cleaned up the code a little bit.