Split up the worker front-end unit tests into separate files

This splits up the worker front-end unit tests files into separate parts. Generally I've based the test files around the object in the worker.

All but the last changeset were doing the minimal copy/paste/fixes to make this happen. The last changeset does a few extra tidy ups of items that are no longer needed, or ensuring that globals are reset after individual tests.