Registry cleanup race

@arabidopsis @nvie @selwin 

I thought I'd take a pass at resolving #454 since I intend to use the job registries pretty heavily. I've also snuck two other small changes in here in separate commits.

Note that while this should ensure that all jobs cleaned from a started registry end up in the failed queue it does mean that `started_job_registry.get_job_ids()` will return any jobs that expire during the `cleanup()` process.
I was thinking that it's more intuitive to "get jobs that have expired at this point in time" rather than "get jobs with a maximum age of X" (while X is actually a time stamp).