Replace gomock with custom heavy mock.

- In order to be more synchronous during testing, created a new mock to
  block during read and writes. This way we have full control over the
  timing of socket events in the tests.
- Protect the channel creation and nil checks of IrcServer with a mutex.