Keep mtime in seg record, simplify, add test

* Keep the mtime in the segment record.  Segments are immutable files
  and this makes it easier to write tests.

* Allow only 2 time scalars, minutes and hours.  Seconds is too fine
  and days can easily be done my multiplying hours.  Less combinations
  means less to break.

* Add test to verify the average + stale check works.

* Set default to 1 hour to amortize the cost rather than build up
  large segments.

* Do strict checking of the app-env value to prevent user typos from
  crashing merge index.