Fix issue #21571700: Need to be smarter about how foreground...

...services get out of app idle

Introduce a new process state to even better distinguish foreground
services from other states.  Rework the INTERACTION reporting to
usage stats to do it less when the screen is off -- require that
an app sit in the foreground service or top activity state for
at least 30 minutes before we consider it an interaction.

Also eradicate a bunch of logging in package manager.

Change-Id: I94249e67f9a9c62e9a92ae104710e6747b16327e
6 files changed