Introduce a more idiomatic frame decoding.

Rather than decoding by using the underlying buffer, decode by reading as much as
possible from the underlying UNIX socket and then handle the decoder loop inside the
client. This speeds up the client by about 50%
Reorder clauses for the most common case.