Speed and stability improvements

Speed:
* cached getInstancesOfClass and hitTestClass (previously outlined but
not implemented)
* LinkedList might be slightly faster in this case because it's O(1) add
and O(1) next, which are the only two things used

Stability:
* unmodifiable lists