Added support for new messages and commands

1. Added support for pong, nick in use and names messages
2. Added support for ping, quit and names commands
3. Refactored message logger
4. Other minor changes