* Add Session class and expose it to JS
* Add error property on the sync config object for the event handler
* tests
* refactor access token refresh
* chrome debugging
* Add a test
* Catch TypeErrorException
* Make exception asserts check error type
* Remove commented-out testcase and check for error type
* Test for Error, not TypeError
All realm operations for the RPC are now done in their own thread so it can be allowed to block on waiting for callback results. The recursive and multi-threaded nature of this makes it pretty tricky, but it works!