Handle device preference changes at runtime

This adds support for handling change to the device preferences while the
miner is running. Specifically, starting mining with "Run on Battery"
enabled, unplugging the device, and then unsetting the value will now stop
mining. This also adds a file I missed in the last commit.