Add test for piping a worker resolver

Add testworkerresolvers test doubles class and a test using it.
Fix work registry add and remove methods
Clean up code
Remove underscore from private fields.

From now on use this.field if necessary. Commit includes also changes to
make code analysis pass cleanly.
Fix naming of variables.
Remove WorkRegistryBuilder, add tests
Add tests for WorkScheduler and Works.
Merge pull request #2 from hiscodeness/increase_test_coverage

Increase test coverage