mod_base: Close websocket when unloading page. Fixes #898