Fix presence body errors found during testing:

* PIDF bodies were reporting an "open" state in many cases where
  it should have been reporting "closed"
* XPIDF bodies had XML nodes placed incorrectly within the hierarchy.
* SIP URIs in XPIDF bodies did not go through XML sanitization
* XML sanitization had some errors:
    * Right angle bracket was being replaced with "&rt;" instead of "&gt;"
	* Double quote, apostrophe, and ampersand were not being escaped.



git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@406294 f38db490-d61c-443f-a65b-d21fe96a405b
Fix presence body errors found during testing:

* PIDF bodies were reporting an "open" state in many cases where
  it should have been reporting "closed"
* XPIDF bodies had XML nodes placed incorrectly within the hierarchy.
* SIP URIs in XPIDF bodies did not go through XML sanitization
* XML sanitization had some errors:
    * Right angle bracket was being replaced with "&rt;" instead of "&gt;"
	* Double quote, apostrophe, and ampersand were not being escaped.



git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@406295 f38db490-d61c-443f-a65b-d21fe96a405b