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
Bug: 122609407
Change-Id: Ifec5a14f488fdb425bdcfee6ffe1f48f9fa9d1e8
2 files changed