Workers need a #state.

In order for `resque list` to work, we need to know what state
the workers have. This method was in the CLI, but didn't end up actually
existing!

Other changes:

1. So that we can run test/resque/worker_test.rb by itself, some lines
   were added so that worker.rb stands alone.
2. cli_test.rb was fixed up so that it doesn't mock things forever. This
   meant that I couldn't mock things in the other test...
3. Extracted worker construction to a method to make it easier to stub.
   I'm pretty sure this isn't threadsafe, though...