First-pass fixes for Haxe 3

- Changed Hash<V>/IntHash<V> to Map<String/Int, V>
- Replaced switches with invalid patterns with ifs
- Replaced missing haxe.io.Output#write* methods with equivalents
- Fixed some type lookup issues
- Other miscellaneous
Replace unused variables with '_' to get rid of warnings