Add BufferedSocket implementation.
Add tests for BufferedSocket.