Clear a stray ref on layers when purging GL resources

Fix a regression of 3df57f7e550a19cb4450ed3896aa51ddb38c2ed2 where
a reference to TextureMapperBackingStore would be kept in the
TextureMapperLayers after purgeGLResources(). This would crash later
on if the window would get destroyed before the
CoordinatedGraphicsScene that own those layers.

Task-number: QTBUG-40734
Change-Id: Id1a596c0f0ba9afd1e163f83c38dda939f521314
Fix race-condition crash on leaving pages using Indexed DB

ScriptExecutionContext does not allow the list of active DOM objects
to change while it is iterating over it. Since the IDB transaction
backend implementations holds several active DOM objects it should
not delete itself while aborting.

Change-Id: Icd2f5b5a3f1957461b9a253d1005896bb2461466