Matcher performance improvements.
This patch greatly improves element to stylesheet selector lookup performance by way of an index that categorizes selectors by their id/class attributes and tag name. The previous implementation had to query every selector for every element which was quite costly. In addition, the previous implementation stored a list of almost all selectors for every element.
My implementation creates a mapper index when the document is initially created and then references that index through all mapper and child mapper objects. A child mapper therefore only needs to store the selectors chained on that element, and any child axes that need to be removed. This strategy  reduces heap usage by many factors compared to the original.
These performance improvements come at the cost of increased complexity. The Matcher code needs a bit of an overhaul/simplification. I'm not sure why the pseudo class code (hover, link, etc) is handed here. We can probably find a way to make the restyling of elements a lot neater.