Fix bugs for OOP case.

- two mozbrowserbeforekey* and no mozbrowserafterkey*
- cannot access evt.embeddedCancelled
- add event listener in shell.js