Module storage: randomly choose between Function and $.globalEval

V8 disables certain optimizations for eval()'d code because scope resolution is
tricky. The same is not true for code compiled via Function(), which always
runs in global scope. Let's see if Function() is faster.

This patch makes ResourceLoader randomly use either Function() or $.globalEval.
The choice is recorded in a boolean `useFunction` property on mw.loader.store
so its value can be logged with load timing measurements. The logging will be
done in WikimediaEvents.

Bug: 58259
Change-Id: I7183778cb65c421ee19dcd61ee1dc0085f86bf10
Merge "Module storage: randomly choose between Function and $.globalEval"