Remove duplicate lines from licence header.
Improve code formatting and JSDoc.
Store single reference to search sevice.

Store a single, reusable reference to the nsIBrowserSearchService,
which is set up initially on load and reused thereafter to avoid
duplication.
Split out hide context menu code for reuse.
Make click on menu search using default engine.

Enhance the search menu so that clicking on the menu itself triggers a
search using the default search engine.

Fix middle click activation so that it works consistently with the
Ctrl + click functionality (i.e. inverse of background / foreground tab
opening preference).