Change TcpSocket::recv to block until all required data is available

Previous solution only worked if data arrived in 1 or 2 packets. The new
solution is more robust and works with any number of packets.