Mt 15615 encoding of xml values

https://youtrack.mindtouch.us/issue/MT-15615 lead to the discovery that we were not properly encoding XML values which would cause the API to reject the pay load. This pull-request ensures that all xml tags, attribute names, attribute values & text values are properly encoded. The following characters are being encoded:
```
<!ENTITY lt     "&#38;#60;">
<!ENTITY gt     "&#62;">
<!ENTITY amp    "&#38;#38;">
<!ENTITY apos   "&#39;">
<!ENTITY quot   "&#34;">
```
source: http://www.w3.org/TR/REC-xml/#sec-predefined-ent