fixes to make it work with recent node and servers

- store port as an instance field
- add startServer method and make it work with recent node
- handle connection errors
- add debug argument to constructor to turn off debug logging to console
- parse timestamp passed in their numeric representation
- pass vote object instead of 4 arguments