Support proper same-page transition

This modification record the fact that a history entry was created by means of a same-page transition. This, in turn will help identify the same page transition when the user navigate back/forward.

This PR is dependent upon the fix for #7602 (#7613) for proper implementation. If #7613 or pushState support is absent, then the following sequence will not have a transition:

start --transition--> other --transition--> same <--transition-- back --transition--> forward <--**no-transition**-- back