purgeExpired

Removes every expired entry and returns how many were removed. Runs in time linear in size.