Use window.postMessage() instead of callbacks for panel content script <-> front-end communication

Newer Firefox releases (>= 31) have stricter separation between
content scripts and page scripts and do not allow functions to be passed
as arguments to functions that have been exported by the content script
to the page script.

Instead use window.postMessage() as a replacement for callbacks to
notify the front-end when the current URL changes or form fields
have been gathered.

This method should also be more portable to other environments
since window.postMessage() is the standard cross-domain messaging API