Bug 1089417 patch 1 - Add assertions that rule processors are valid before we access them.  r=heycam

This was just something that seemed worth asserting in the process of
debugging, since I wanted to see if it was the problem.
Bug 1089417 patch 2 - Add assertion that RecordStyleSheetChange is called inside an update.  r=heycam

This was just something that seemed worth asserting in the process of
debugging, since I wanted to see if it was the problem.
Bug 1089417 patch 3 - Add mochitest.  r=heycam

Note that if I make the style element currently /* empty */ have a rule
in it, the test passes.

Patch 8 also makes the test pass.
Bug 1089417 patch 4 - Define equality operators on nsMediaQueryResultCacheKey and the types it contains.  r=heycam

This is needed for the equality comparison in
nsCSSRuleProcessor::MediumFeaturesChanged in patch 8.
Bug 1089417 patch 5 - Add method to save the current media query result cache key from a rule processor.  r=heycam

This is needed for patch 7.
Bug 1089417 patch 6 - Pass the previous CSS rule processor to the constructor of the new one (when we replace one with another).  r=heycam

This is needed for patch 7.
Bug 1089417 patch 7 - Save the previous media query cache key on the rule processor.  r=heycam

This depends on patches 5 and 6, and is needed for patch 8.
Bug 1089417 patch 8 - Only drop MediumFeaturesChanged on the floor if we've never computed style before, rather than never computed style using this rule processor.  r=heycam

This depends on patches 4 and 7.