Moves clear data out of commit

A previous refactor had moved a call to clearAppDataLIF, which makes
calls to installd into a block that was locked on mPackages. This
resulted in PackageManagerService holding the lock while installd
attempted to do the same and making install essentially blocked
indefinitely. To fix this, we moved the call to a post-commit phase
where the mPackages lock has been released.

Test: `atest CtsUiRenderingTestCases` doesn't halt
Change-Id: Ibe735a4351c14ab1428200f2d665aaff01119876
Fixes: 118888402
1 file changed