store mutable state on Browser and reset after restart

This is the fix for #564, in which the mutable state set on the Browser was not persisted on the Ruby side and reset after a client restart.

It looks like this issue was discovered and fixed for 'debug' already but 'js_errors' and 'extensions' remained.