Ensure mutation to multiple objects is done atomically

Acquire both parent and child locks before mutation begins.
This ensures no concurrent mutation is possible on another thread.

Bug: 161954235
Test: atest StagedInstallTest AtomicInstallTest
Change-Id: If4b83ef83bbe7e85e91a6b8f16e01d4dc0d6d8e6
1 file changed