Prepare housekeeping interval to be dynamic.

Change housekeeping to be from a fixed interval to a possibly varied
interval decided by nextHousekeeping().
Merge pull request #222 from vmarmol/variable-housekeeping

Prepare housekeeping interval to be dynamic.