Change Hashtable and HashSet to LinkedHashMap and LinkedHashSet. Fixed lots of warnings about generics and changed from Iterator to foreach loops

This is an attempt to make sure that jmake processes items in the order they are given, and to clear out lots of type warnings so we can make sense of the build/ide output.

Change Hashtable and HashSet to LinkedHashMap and LinkedHashSet. Fixed lots of warnings about generics and changed from Iterator to foreach loops.

Bugs closed: 7

Reviewed at https://rbcommons.com/s/twitter/r/675/