Check for unsupported Postgres protocol version and give explicit error

Previously failed mysteriously due to misinterpretation of the startup message.

Includes just enough V2 protocol support to get the error message formatted the way the client expects.