Fix focusin in browsers which do not support it

Some browsers do not support focusin (Firefox). When using framework
which does not provide its own implementation (zepto.js), tab
navigation is not confined to the dialog.

This fix falls back to a capturing focus event if it is supported by the
browser.

Caveats:

  * The check for focusin support relies on window.onfocusin, which is
    not present in all browsers supporting focusin (notably Chrome).
    This should be OK, as addEventListener works in Chrome and IE does
    have window.onfocusin.

  * The event needs to be removed manually by removeEventListener.

Tested in Firefox 28, Chromium 32, IE7/9/11.