Validate restored file paths against their nominal domain

Bug 8460775

Change-Id: Ib16d740a001adf4f9cb9ccaa31066ac7cadfb430
Ensure install-during-restore is like install-then-restore

When we've installed an apk from the archive, recheck whether
to apply the system-uid policy restrictions around file system
restores.

Bug 8833099

(cherry picked from commit 2baf6dcfcf7fc1705db25e64dc0cb11fa3509d39)

Change-Id: I972fe1543f2234aa76baf562d6f806175ac0248e
Merge changes I972fe154,Ib16d740a into jb-mr1

* changes:
  Ensure install-during-restore is like install-then-restore
  Validate restored file paths against their nominal domain