Bug 961526 - Part 1: Clear env cache when pruning environments.
Bug 961526 - Part 2: Use insert (rather than insertOrThrow) for discrete daily insertions.
Bug 961526 - Part 3: Factor out field cache invalidation - fixes synchronized bug.
Bug 961526 - Part 4: Invalidate fields cache and measurement versions cache on measurement deletion.
Bug 961526 - Part 5: Fix testMeasurementRecordingConstraintViolation.
Bug 961526 - Part 6: Correct bug in invalidation (srsly oops).
Bug 961526 - Part 7: Make pruneEnvironments comment more descriptive.
Bug 961526 - Part 8: Add environment cache clear testing.
Bug 961526 - Part 9: Remove TODO (it works correctly).