Bug 1038174 - Prevent a race condition when writing the experiments cache. r=gfritzsche

We now mark the experiments cache as clean before writing the cache.
This means that any changes to the data between collecting it and when
the actual write executes will properly mark the cache as dirty.

--HG--
extra : rebase_source : 1c8b2dd2365ff2c27e7b545c5347ab178d6818d9
extra : histedit_source : a6b10099af6e8d4c67450e9f4afef403d5b74436
Bug 1036036 - Stop leaking docshells in Session Store tests. r=ttaubert

When adding a SHistoryListener in the Session Store test frame script
we were creating an intermediate global variable that was rooting the
docshell. This prevented things from being GC'd properly.

I've removed this intermediate variable and we should no longer keep
the docshell alive. This will probably also fix Bug 1036031.

--HG--
extra : rebase_source : 1394966f4180da44c4c29c8bba9842f7daf614fd
extra : histedit_source : e60ce5cf45b52e85207bf2f69882df86fa628ed7