Add support for capabilities (XEP-0115)

See http://xmpp.org/extensions/xep-0115.html