Stop unfiltered BLE scanning on screen off

Stop unfiltered BLE scans when the screen goes off.
These scans will be resumed when the screen turns on
again unless these scans are stopped by application
itself before the screen is turned on.

While screen is off, new scans are allowed to be
created but scan instances will not receive results
until the screen is turned on.

Stats in bluetooth_manager dumpsys are updated to show
suspended time as below:

  LE scans (started/stopped)         : 11 / 10
  Scan time in ms (min/max/avg/total): 1107 / 15003 / 7623 / 83859
  Total time suspended               : 4257ms
  Total number of results            : 14
  Last 5 scans                       :
    2017/07/26 15:41:50 - 14993ms Filter 0 results (6)
    2017/07/26 15:42:05 - 5021ms 0 results (6)
    2017/07/26 15:42:10 - 9908ms Filter 0 results (6)
    2017/07/26 15:42:20 - 5011ms 11 results (6)
      └ Suspended Time: 1193ms
    2017/07/26 15:42:25 - 14990ms Filter 0 results (6)
  Ongoing scans                      :
    2017/07/26 15:42:40 - 1342ms Suspended 0 results (6)
      └ Suspended Time: 1239ms

BUG: 62264269
Test: Tested BLE scanning applications.

Change-Id: I017f0cdc0fc52a0a30d6cf870d7e688e5ff18df9
2 files changed