Bug 870171 - Expire old data (2)

Note that this is built on #342 which must be pushed first.