[WIP] Replace for-in loop in fonts.js to improve performance

Improves #4580 (thanks to @fkaelberer and @p01 for debugging this!).

Note that the cMap errors/warnings in the console are another issue described in #4800.

- [ ] Nested low-high pairs in codespaceRanges? Do we have an example for that?