Bug 1023758, part 1 - Refactor the node scanning loop in nsCycleCollector::ScanIncrementalRoots(). r=smaug

This will make it easier to scan for things besides gray JS nodes.  It slightly
reorders the tests we do, but it shouldn't really matter.
Bug 1023758, part 2 - Dead traversed objects should be treated as incremental roots and colored. r=smaug