Replace expensive usage of Object.keys() with fast alternative
Replace expensive usage of Object.keys() with fast alternative

What we are validating here is not user-input. It doesn't need to be
perfect. All we care about are e.g. typos as well as having a default
when no value was provided.

Change-Id: I58d345a7f64c13fc8e820d460fb28ec88ca40147

wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui