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
diff --git a/services/audiopolicy/common/managerdefinitions/Android.mk b/services/audiopolicy/common/managerdefinitions/Android.mk
index bacb780..3336b79 100644
--- a/services/audiopolicy/common/managerdefinitions/Android.mk
+++ b/services/audiopolicy/common/managerdefinitions/Android.mk
@@ -39,7 +39,7 @@
 
 LOCAL_SRC_FILES += src/Serializer.cpp
 
-LOCAL_SHARED_LIBRARIES += libicuuc libxml2
+LOCAL_SHARED_LIBRARIES += libhidlbase libicuuc libxml2
 
 LOCAL_C_INCLUDES += \
     external/libxml2/include \