Fix ruleset counter updating in e10s

The 'appcontent' element no longer exists. Use onStateChange
to catch when a top-level document is loaded.