tests/unix_sockets: Parse and write the packet length earlier/later

Now the message parser itself doesn't have to care about the length
of the packets at all, and we can start implementing multiple packets
in a single receive.