Event handlers for popstate, hashchange and clicks

- if pushstate is enabled listen for popstate events otherwise
  listen for hashchange events.
- listen for all clicks (this will later be used to change the url)

@barnabyc @flahertyb