Add initial shell line buffering

Instead of waiting for the entire command to finish in the client
(via .communicate()[0]) and sending the whole stdout over, buffer the
output line by line so commands like ping get immediate feedback.
Fix random recv() hangs

In the initial while loop of PoetSocket.recv(), cap the initial recv()'s
at a maximum of prefix_len (4 bytes). I'm not exactly sure why
recv()'ing SIZE (4096) resulted in hangs, but in situations where lots
of data is being sent over by the client extremely quickly (ls -lR, for
example), the socket buffer could have actually been filled with the
contents of multiple send()'s from the client before the server had a
chance to process the data of one message and flush the buffer.
Since we're using such as massive recv() size (4096), relative to the
length of each message being sent on the wire (10's of bytes), the
initial loop recv() would have scooped up the contents of multiple
messages, 4 byte header and all.

This is actually the cause of the base64 decoding crashes I noticed. In
these crashes, we were trying to decode valid base64 strings separated
by groups of 3 NULL bytes. These three NULLs are actually the unused
bytes of the header, since messages in this case rarely exceeded the length
that could be represented by 1 byte.