resourceloader: Use perf.now() for mediaWikiLoadStart in startup.js
Currently we're using 'new Date' which is less accurate for high accuracy
performance measures. On top of that, we are actually using performance.now()
in Navigation Timing to measure mediaWikiLoadEnd, and subsequently
relating it to mediaWikiLoadStart to produce mediaWikiLoadComplete.
Mixing Date and performance.now produces inaccurate results since the
two are usually not in sync. See T153819 for further details.
Solve this by moving the polyfil to startup.js instead.
Also add a basic unit test for mw.now().
Bug: T153819
Change-Id: Ib44538155aa9ba432ec4c58b09ead5333a3a942d