Refactored xmlsec to support enveloped signatures
Temporary fix to sign electronic invoices in Uruguay

TODO: proper handle root namespaces in xml templates using SimpleXMLElement (see WSSE workarounds)