Bug 1043648 Calling `window.stop` in page-worker's content script cause error in console

It seems that `window.stop` makes `pageshow` to be emitted, before the `contentWorker` is actually set.
Set the `contentWorker` before the listeners seems resolve the issue.

Notice that the unit test is on `test-page-worker` instead of `test-content-worker` because using directly the worker doesn't cause such issue – probably because some frame stuff related.