Misc Updates to Hierarchies

* Updated loops to foreach loops
* Added generics
* Made one FastHierarchy method public
* There is no unit test to validate the MultiMap implementation. But the call graphs 'look good'. Since MultiMap is also used in Spark, that's an indicator. (Yes, I'm lazy/overworked to write one)

P.S. We could consider dropping the in-house MultiMap and use Guava's instead...