The UID allocator stores complete UIDs, not app IDs. When removing a UID
from the range, we should therefore also use the UID, not the app ID.
Also added a test to cover this scenario, which passes with this change.
Bug: 146313311
Test: atest ActivityManagerTest
Change-Id: I1118ec73dcee5987e12f35aabce5cfa8cbe407a1
(cherry picked from commit c9a0df2d88)