Fix sessionStorage exceeds quota error in Safari

Fixes issue #86. We're adding an attempt to write to sessionStorage before we set the hasSessionStorage flag. This catches scenarios where sessionStorage is available but cannot be written to.

I'm also contemplating adding another try/catch block in `setState()` on the theory that the writeability of sessionStorage might change from page load to when we try writing to it later (if in the interim lots of data ends up getting written to sessionStorage). Thoughts?