Use TaskScheduler for scheduling tasks
This branch adds a TaskScheduler interface, which replaces most uses of ScheduledExecutorService for scheduling tasks. The default implementation delegates to a ScheduledExecutorService. The Android implementation uses a combination of a periodic ticker that runs every 10 seconds when the device is awake, and an alarm that fires approximately every 15 minutes whether awake, asleep or dozing.
Later MRs will add wake locks to ensure that tasks aren't interrupted by sleep or doze.
First part of #1142 (closed)