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
isEmptyObject should use hasOwnProperty: prevents from always returning true if the Object.prototype is extended

#176

Signed-off-by: Alexander Johansson <alexander@n1s.se>
fixed issue #158
Merge remote-tracking branch 'remotes/KATT/master'
Cherry picked https://github.com/hrunting/history.js/commit/f13f2bf7751acf70c8c2065bbd8c367706a2fd16

added option to force no suid

- merge commit 0cdd5f52fb2c36764e3665d8a41dccc6da744595
- apply logic to scripts/compressed/history.js as well

Conflicts:

	scripts/compressed/history.js
Cherry picked: https://github.com/hrunting/history.js/commit/31eb079cd991189f5b0e164e63170adb519a2646

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

Conflicts:

	scripts/uncompressed/history.html4.js
	scripts/uncompressed/history.js
- Change History.getHash to return consistent hash, ala History.getLocationHref
- Fix an issue where HTML4 replaceState wasn't firing when SUIDs were disabled and the url didn't change
- Make extractId ignore the fragment if one is present (normally the hash is passed without an fragment)
- Remove all encoding / decoding of URLs except when creating or extracting a fragment, based on the assumption that all inputs to replaceState / pushState are appropriately encoded
- Change escapeHash/unescapeHash methods to use encodeURI/decodeURI instead of window.escape/unescape
- Build compressed and bundled scripts
- Add potential fix for IE8 not returning full hashed url from getLocationHref when hash contains encoded characters
- Built
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
Update scripts/uncompressed/history.html4.js

Match current W3C popState event semantics for HTML4
Added error testing and quota relief for sessionStorage.setItem

Mostly this is a band-aid to keep the engine chugging along in case the
dreaded 'QUOTA_EXCEEDED_ERR' pops up. Probably not the optimum solution
but it does work (removeItem is apparently REALLY slow, so doing it
every time would be bad)
Fix IE 6 HTTPS warning

Set IE iframe src to javascript:false so IE doesn't show a mixed content
warning
Fixed bug in html4 pushState function which left History in a busy state
Added analytics
Updated analytics
Merge remote-tracking branches 'STRML/master', 'gigafied/master' and 'sbearcsiro/master'

* STRML/master:
  Update scripts/uncompressed/history.html4.js

* gigafied/master:
  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
  Added History.options.html4Mode for easier debugging

* sbearcsiro/master:
  - Add potential fix for IE8 not returning full hashed url from getLocationHref when hash contains encoded characters - Built
  - Change History.getHash to return consistent hash, ala History.getLocationHref - Fix an issue where HTML4 replaceState wasn't firing when SUIDs were disabled and the url didn't change - Make extractId ignore the fragment if one is present (normally the hash is passed without an fragment) - Remove all encoding / decoding of URLs except when creating or extracting a fragment, based on the assumption that all inputs to replaceState / pushState are appropriately encoded - Change escapeHash/unescapeHash methods to use encodeURI/decodeURI instead of window.escape/unescape - Build compressed and bundled scripts
  Cherry picked: https://github.com/hrunting/history.js/commit/31eb079cd991189f5b0e164e63170adb519a2646
  Cherry picked https://github.com/hrunting/history.js/commit/f13f2bf7751acf70c8c2065bbd8c367706a2fd16
  fixed issue #158
  isEmptyObject should use hasOwnProperty: prevents from always returning true if the Object.prototype is extended

Conflicts:
	scripts/uncompressed/history.js