Add some extra exception catching/logging to readxml

To diagnose issues when restoring data and to make sure errors
don't cascade.

The indentation level was getting too high in readXml, so I also
extracted two methods

Test: PreferencesHelperTest, compare S & T (restore) dumpsys in a
diff tool
Bug: 229621950

Change-Id: I9bd7058108422548f4ad23541d040c29c6ac8d5d
1 file changed