Bug 1060138: Fix context-menu to work in e10s.

This updates the context-menu API to support e10s.
I would suggest looking at this part as a split diff rather than unified, the code here has changed completely. onMessage still works just fine in e10s