Delay calling pushState() until the xhr succeeds. Fixes #319

With this change the address bar only changes one the pjax request has come back successfully. This stops the incorrect ``HTTP_REFERER`` from being sent with fallback requests.

Have also added a test for this and re-jigged some of the existing tests to match the new behaviour.