improve performance by using less goroutines

- get rid of command channel in Client
- get rid of loginTimer; use other timers instead
- move debugging code to debug.go
keep track of whether sockets are closed
Merge pull request #38 from jlatt/performance

improve performance by using fewer goroutines per client