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.
Notice that from briefly looking at its code, I would conclude that WeakHashMap will only clean itself opportunistically, that is once you call certain functions of it. Or in other words:  It won't run a thread to clean nulled references.

For an example of how to actively clean a map of weak stuff, see class FCPPluginClientTracker of my fred branch fcp-plugin-rewrite.