Add Request.of_string to parse messages from a client.

The excessive amount of nesting is fairly ugly: perhaps it can
be flattened?