[archive] fix permission restoration on unarchive after install-archived

Use updated users for permission restoration if the app being updated is
previously installed as archived. This change slightly changes the order
of things. Previously: 1) restoreAndPostInstall 2)
handlePackagePostInstall on handler thread 3) restore permission in the
middle of handlePackagePostInstall. After this CL: 1)
restoreAndPostIntall 2) restore permisison on handler thread 3)
handlePackagePostInstall on the handler thread.

BUG: 325618438
Test: manual

Change-Id: Ida9b51932b26efc60c1867b0d4e513a8fd8575b3
2 files changed