Default to focusmanager.testmode=true in Firefox profile

This is the change from pull request #951 rebased against master with one more change to restore a require statement that was removed in the interim.

I'm submitting it as a new PR to trigger a new Travis CI build.