Add forEach method to rtree, use it in feature cache

This saves having to create feature lookup objects and iterate through lookup properties multiple times.