Fix TcpSocket::read*() to use select() and a buffer