l10n.js use of for...of does not work with uglifyjs or ES5-only uses

Originally reported here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1002920

This pull request uses plain for loops instead of for...in loops so that the code is ES5 friendly, which allows wider use and tool support.

Just transferring the changes done in this pull request:
https://github.com/mozilla-b2g/gaia/pull/18771

to the source area. I'll merge that other pull request though to gaia once travis reports green.