Attempt to fix deadlock on saveOverrides

Currently, the lock on mChanges is held continuously while saving the
changes to disk, however if the serialization triggers an OomAdjustLSP,
that triggers yet another call to the compat framework - causing a
deadlock.
Currently, OomAdjust happens during XML serialisation, so releasing the
lock after we've collected all the data should fix the deadlock, however
there could be issues if OomAdjust happens while collecting the
overrides themselves. That seems somewhat unlikely, and would likely
signal a larger issue.

Test: atest CompatConfigTest
Bug: 190611974
Change-Id: I01e4802baeecf2757044609b91b7b7a40e728d4e
1 file changed