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
Added History.options.html4Mode for easier debugging
Added History.options.delayInit (Boolean).
Useful if you want to override any default History.options
setting asyncronously and manually call History.init() when
you are ready to initialize
Merge pull request #1 from hrunting/encoded-uris

URI Encoding and Hash consistency changes from hrunting.
Removes stray spaces so that the build script can run.
isEmptyObject should use hasOwnProperty: prevents from always returning true if the Object.prototype is extended

#176

Signed-off-by: Alexander Johansson <alexander@n1s.se>
Disable session storage if it's present but not working, thanks to paulschreiber
fixed an issue in Safari's Private Browsing mode where setItem throws an exception
Adds better error handling for the quota exceeded problem seen with the iPad.
Consolidated var in sessionStorage to the top of the function. Re-build compressed and bundled.
Merge branch 'master' of https://github.com/gigafied/history.js

Conflicts:
	scripts/uncompressed/history.js
Merge branch 'master' of https://github.com/billmag/history.js

Conflicts:
	scripts/bundled/html4+html5/jquery.history.js
	scripts/bundled/html4+html5/mootools.history.js
	scripts/bundled/html4+html5/native.history.js
	scripts/bundled/html4+html5/right.history.js
	scripts/bundled/html4+html5/zepto.history.js
	scripts/bundled/html5/jquery.history.js
	scripts/bundled/html5/mootools.history.js
	scripts/bundled/html5/native.history.js
	scripts/bundled/html5/right.history.js
	scripts/bundled/html5/zepto.history.js
	scripts/compressed/history.html4.js
	scripts/compressed/history.js
	scripts/uncompressed/history.html4.js
	scripts/uncompressed/history.js