Rewrite state machine and account for async auth process

- Update jshintrc to reflect a node environment
- Remove the reconnector and move queuing functionality into
  state-machine
- Use a finite state machine with transition triggers
- Update tests

/cc @vanchi-zendesk