Fix bug aborting popstate

I hit the bug reported in this issue #5210 a few days ago. 

tl;dr
When you hit the back button and the transition is aborted, the url has already been updated is not rollbacked.

I've managed to fix it, but I have no clue about how to test it, because I would involve set some routes and play with the history. Seems almost an acceptance test to me.
I think is just the opposite. I want to push the state I've just poped

Initial history:
"/" ==> "/foo" ==> "/bar"
I click the back button. That triggers a popState, so the history now is:
"/" ==> "/foo"
But the transition aborts, so I have to push the state i've just popped ("/bar"):
"/" ==> "/foo" ==> "/bar"