Use alarms to schedule essential tasks
We use a ScheduledExecutorService to schedule essential tasks such as key rotation and polling for connections. When Tor is disabled or doesn't have internet connectivity, the Tor plugin's wake lock is released and the device may sleep or doze. To ensure that essential tasks run during sleep or doze, we should schedule them using alarms.