Port safe parsing with minidom patches from Nova

Prevent attacks through xml entity expansion etc.

Fixes LP# 1100282

Change-Id: I391531deac122697556c282184c8f8890ea66489
Merge "Port safe parsing with minidom patches from Nova"