try to more consistently handle URI-encoded URLs

- use document.URL where possible as it's more consistently URI-encoded
  across different browsers (e.g. Safari 5.1)
- for HTML4 browsers, assume the URI passed to pushState() is URI-encoded,
  and make sure that every character is encoded like document.URL
- fix a spelling mistake in the unsupport-fragment error
s/fragement/fragment/g in history.html4.js
provide a consistent URI-encoded document.location.href

Different browsers handle document.location.href and document.URL
in inconsistent ways.  Provide a new History.getLocationHref()
function to provide a consistently URI-encoded href
HTML4: handle escaped/unescape versions of URLs consistently

When comparing hashes in HTML4 browsers, always compare fully
escaped versions of the hash (via encodeURIComponent).

In cases where an escaped URL was being pushed, HTML4 browsers would
fail to trigger a statechange event because a completely escaped URL
would fail to compare properly to a partially escaped URL.  That would
lead to a second pushState() of the same URL, leading to a no-op.

https://github.com/balupton/history.js/pull/108#issuecomment-3443739
Merge pull request #1 from hrunting/encoded-uris

URI Encoding and Hash consistency changes from hrunting.