Background jobs

This changeset introduces an abstraction for (maintenance) jobs running in the background, of which execution may be triggered from other threads. SubscriptionManager could very well use this, but I haven't made it do so yet.

~~@xor-freenet Unit tests are not complete, I'll be finishing those tomorrow. I'm filing this pull request early so you can have a look at it already.~~
> so jobs created after the wait has started will not be waited upon.

This is bound to cause race conditions :| It would be much nicer if it was fully atomic, i.e. creating new jobs during the execution of the function wouldn't work.

I'm not sure whether I want to annoy you with making fixing this a merge requirement: I don't even need this function of the factory within WOT probably, because each object which will use jobs already has its termination function, so it can terminate them individually.
Still, it would probably be better to not merge such dangerous code before fixing it? :| People might start using it in the future in dangerous ways...

If the amount of work the whole of this has created for you is to much already, don't hesitate to tell me, then I will try to cut down upon further change requests.