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.
The name ending with an adjective ("started") reads like "isJobStarted()", i.e. it sounds like this function is a getter / read-only.
But actually it is a setter,  it modifies the state of the class.
So I would suggest you rename this function to be an imperative: "startJob()"