Fix an issue that cause notification to not be sent

Since hub_worker is not set to null after hub page is closed, using hub_worker
might cause errors. hub_worker cannot be set to null by listening to the
detach event in page-mod, since in the case of refresh, detach might
happen after the new page-worker is attached.
Surrounding usage of hub_worker with try catch resolves the issue.