Batterystats handles nested unoptimized ble scans

When a ble scan starts, it tells batterystats whether that scan is
unoptimized. When the scan stops, batterystats is not informed of
whether the stopped scan was unoptimized. Because the ble scan call
could not be nested (couldn't call start twice without stopping first),
this was fine, but now nesting is possible, so batterystats needs to
know whether the stopped ble scan is unoptimized.

Bug: 63456783
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: no new errors when run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testUnoptimizedBleScans

Change-Id: Ia73f294cf1807ddaf20f1c0bcc28add001cac78c
Merged-In: Ia73f294cf1807ddaf20f1c0bcc28add001cac78c
(cherry picked from commit 94c5a313d7313a9a88abdf4267af43b87deb0dd2)
5 files changed