audiopolicy: More XML deserializer refactorings

 -- use root and cur argument names consistently;

 -- replace 'while' loops with 'for' loops;

 -- avoid passing around of 'xmlDoc';

 -- get rid of PtrElement, parametrize adding to collections.

 -- make possible to return immutable elements via Return<>
    container from android::hardware.

Test: Compare dumpsys media.audio_policy A/B, check audio
Change-Id: I5e499bdd7196703c4f788d881f331eb9629bf790
3 files changed