Bug 870171 - Part 1: Add deleteOrphanedAddons and its test.
Bug 870171 - Part 2: Add deleteEventsBefore and its test.
Bug 870171 - Part 3: Add deleteOrphanedEnv and its test.
Bug 870171 - Part 4: Add deleteEnvAndEventsBefore and its test.
Bug 870171 - Part 5: Add deleteDataBefore and its test.
Bug 870171 - Review comment: Change to assertTrue(Cusor.moveToFirst());