Verify that we can stage the same package immediately after abandoning it

Also, when a session is abandoned, the system sends an intent for the
session using IntentSender. So after abandoning session A, if we try to
commit session B, we might just receive an intent for session A first
and then intent for session B.

Sometimes, we just don't care for intents targeting other sessions. As
such, I have added a method that only fetches intents targeting a
particular sessionId.

Bug: 145925842
Test: atest StagedInstallTest#testStageAnotherSessionImmediatelyAfterAbandon
Change-Id: I85cc7b07f6954bc91cff83e5b040d8f75a86d8be
3 files changed