Don't full-data back up apps in foreground-equivalent state

We have to kill the app and bring it up in a controlled lifecycle mode
in order to do full-data backup, and if it's e.g. playing media, this
is hugely disruptive.  Instead, we now check whether an app being
considered for full-data backup is in a user-observable state, and
defer its backup if so.  We don't kick it all the way down the
daily-backup cycle in this situation -- we set it up to retry the
backup in just a few hours.

Bug 25960428

Change-Id: I576f25c6fb07545565f59bd685624c612b9c5ffd
4 files changed