Include state & settings with Bugsnag report. Closes #395.

- Moved logging stuff to separate namespace
- Add extra data with Bugsnag report. See #395