Refactored: socket, connection, listener

- Changed socket type to contain any kind of state, not just a file descriptor.
- Allow both blocking mode and nonblocking mode for socket I/O operations.