Change scan downgrading to be app independent

Before this patch, every time an app started a new scan it would reset the
timer to downgrade apps down to opportunistic. Now each app is kept track
of individually so that another app doing frequent short scans doesn't cause
a long scanning app to avoid downgrading.

Fixes: 34224062
Test: Tested scanning multiple times with multiple apps / TestTracker:73279
Change-Id: Ibcae9115dcd0fb5325f7bc9fc5d6e0fe4bf6e062
(cherry picked from commit 65e839fa45222955a605f6270a240edc68b21617)
2 files changed