Update detection code to correctly tag Internet Explorer 11 as IE

Thanks Microsoft!
Prevent focus wars (especially prevalent in Internet Explorer)

Adjusting the selected range in the event trap can trigger a new focus
event under some conditions. Prevent this from going into an infinite
loop by ignoring new focus events that arise while currently processing
a focus event.
Merge pull request #811 from peitschie/ie-fixups

Assorted fixes for Internet Explorer 10 + 11
Workaround for IE dropping the leading slash in pathnames

Various versions of Internet Explorer seems to neglect the leading slash
under some conditions (not when watching it with the dev tools of
course!). This was confirmed in IE10 + IE11

Fixes #809.