Rewrote the pushstate #652 test for stability purposes

The test for pushstate was too inconsistent in its result (often failed when running in Travis-CI). This rewrites the test so that it only tests the unique cases as well as that it doesn't rely on any timing race conditions.