Prevent crashes in res_xmpp when receiving large messages

Similar to r378287, res_xmpp was marshaling data read from an external source
onto the stack. For a sufficiently large message, this could cause a stack
overflow. This patch modifies res_xmpp in a similar fashion to res_jabber by
removing the stack allocation, as it was unnecessary.

(issue ASTERISK-20658)
Reported by: wdoekes

git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@378409 f38db490-d61c-443f-a65b-d21fe96a405b
Prevent exhaustion of system resources through exploitation of event cache

This patch changes res_xmpp to no longer cache events under certain circumstances.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore


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