Fix use of libxml_disable_entity_loader() for Xml::build() too.
Fix use of libxml_disable_entity_loader() for Xml::build() too.

Removed code duplication. Refs #14886.

cakephp/cakephp,CakeDC/cakephp,ndm2/cakephp,cakephp/cakephp,ADmad/cakephp,CakeDC/cakephp,cakephp/cakephp,ndm2/cakephp,ndm2/cakephp,CakeDC/cakephp,ADmad/cakephp,ndm2/cakephp,cakephp/cakephp,ADmad/cakephp,CakeDC/cakephp,ADmad/cakephp