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.~~
Theoretically, this function is not needed since waitForTermination() returning guarantees that the job is dead.
The fact that it exists nevertheless could mislead developers to write busy-loop shutdown mechanisms such as:
```java
while(!job.isTerminated()) { }
```

But it might have some use in the future, and you already wrote it, so I would say you keep it but amend its JavaDoc with something like:
> Please do not use this as a busy-loop shutdown mechanism. Rather than looping around this function, use {@link #waitForTermination(long)} to wait until this returns true.