Clear out the handlers in the web worker factory

This means that when init is called, all the state is cleared out.