Torch: Allow torch to be toggled off without knowledge of state

Change-Id: I1e7fe91d82f08eb6976bacc3d0eb3a4444af6f4b
Signed-off-by: Roman Birg <roman@cyngn.com>
Torch: signal to framework TorchService not to kill us

Change-Id: I1f7f3d1cde7596919da2132748f02cae25cdf5e8
Signed-off-by: Roman Birg <roman@cyngn.com>
Make torch shutdown by camera usage work properly.

Previously, there were two issues when torch was shut down due to
another camera app being used:
- The service is stopped asynchronously. Work around that by
  shortcutting the torch disable path
- Even after torch shutdown, the periodic refresh may try to enable it
  again. Avoid that by not using the periodic refresh for devices which
  use the camera interface, it's not needed there anyway.

Change-Id: I613c11330875c23c04b7d7339529fb8f1774adcf
Automatic translation import

Change-Id: I6aa3ee7aea0412f8698d539a95776bc6b933ce41
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Torch to into sokp-kk