Fixes incorrect app id cleanup on failure

This change makes sure that we track the creation of app IDs so that we
only delete when we actually created something new.

Fixes: 130209119
Test: atest SharedUserIdTest
Change-Id: I03e38b4dc16e9ccccd7d10bfe78bcaedc317d0cb
2 files changed