[os_xml] catch all possible memory errors
[os_xml] OS_ClearXML: null pointers
[os_xml] model length of xml error buffer as macro