focus.js: avoid spurious exception and remove some unused code.
fix popup.js issues, including fact that widgets no longer have methods like onChange
Rewrite HasDropDown code to use promises, and also to eliminate race conditions
between mouseup/keyup vs. when the popup completes loading.
convert HasDropDown test to functional test and expand test