Fix broken spec in IE and PhantomJS

Seems both IE8 and PhantomJS need a lot of tender love and care to
dispatch a keyboard event. Had to open several conditionals to handle
them all.

This is the only spec that needs this help as once it works we can then
use the internal event system of PasswordWidget and never have to worry
about the keyup event again.

For reference IE8 lacks a dispatchEvent allowing a simple if/else to
detect. Phantom JS however doesn't support the standard event
constructors (yes, there is a languished [issue reported][1] about it)
but it does support dispatchEvent causing a difficulty in testing for
it. I used a try/catch to trap if it fails to create the event per
standards and fall back to the deprecated createEvent method that is
supported by PhantomJS.

[1]: https://github.com/ariya/phantomjs/issues/11289