Allow maximum job age to be specified when cleaning up or getting expired jobs from a registry.

This ensures that all jobs cleaned from a started registry end up in the failed queue.