Ignore null package names on AppIdleHistory writes

AppIdleHistory will fail to persist to disk if a null package name makes
it into the map. This change avoids the failure and adds more detail to
the log in the event of a failure.

Test: atest AppIdleHistoryTests
Fixes: 122609407
Change-Id: I30115265a1b963a0d66bad4fe15c69907ee8e53c

Merged-In: Ifec5a14f488fdb425bdcfee6ffe1f48f9fa9d1e8
2 files changed