some error handling and create a new instance of pump on each socket
fixed asyncread
removed unused test html
replace unsafeWindow communication with a "secure" channel

basic idea of the 'protocol':

* Addon creates custom event in document for a "handshake", and listens
there. Completely public.

* Userscript sends a message with that event with name/namespace and a
nonce, which is set with GM_setValue

* Addon builds the config key name with that name/namespace, and checks
that the userscript effectively set that value, ignoring the handshake
if it's not correct

* Addon creates a "secret" for the event name an uuid, and sets it to
another config value that can be accessed by the userscript.
The event itself is created and listened on.

* Addon replies with the same handshake public event, only notifying that
it was successful.

* Userscript receives that reply, reads the secret event name from the
config, listens on that event and sends messages through it too.
added userscript.js example
Make userscript.js a robust, scalable, modern interface for flexible, personalized, cutting-edge Internet-enabled FireIPC application product e-solutions.

In other words, make it object oriented.
Close server socket onUnload

Also separate outgoing json by newlines