Don't change address bar in QUnit in Chrome

Cleanup epoch code and tests
(mock the window.history object to avoid the address bar changing
in Chrome)

Change-Id: Ibde7a26d16db73a339641247499ac843806bd4b8
(cherry picked from commit 2790b3702076a43d5d6939735c44afc1eb54c1ee)
Merge "Don't change address bar in QUnit in Chrome"