Add container garbage collection.

Work in progress, will add unit tests this evening, assuming this looks ok.
I don't like TTL because TTL implies that we _will_ delete it when it's that old, whereas here we just guarantee that we _won't_ delete it if it is younger than this.

Flag is a Duration object, so any units are accepted.