fix(web-server): detach listeners after running

Remove listeners from the global process and the webserver when we're
done.