[review] From trac: Support for Jabber XEP-0280, "Carbons"

Patch by `Stephen Shirley <kormat@gmail.com>` (`kormat` on irc) from trac

Ticket: http://bugs.bitlbee.org/bitlbee/ticket/1021

Specification: http://xmpp.org/extensions/xep-0280.html

tl;dr: Carbons is an XMPP extension that lets clients receive messages sent by other clients connected to the same account. Basically support for multiple locations that makes sense to most people, unlike the old 'resources' concept.

Notes by patch author:

>
>I have written a patch against bzr rev 994 (bitlbee 3.2.0) that adds Carbons support. My C is a bit rusty, and i'm new to the codebase, so careful review and feedback requested :)
>
>A few comments on my implementation:
>
> * I'm looking for feedback before i go any further, but right support is functionally complete
> * Tested using prosody 0.8.2 (but with carbons support taken from 0.9.0rc) and irssi 0.8.15.
> * It queries for carbons support and automatically enables it if present. This should probably be a setting.
> * IRC doesn't provide a way for the server to tell the client "hi, you sent this message", so displaying forwarded messages that you have sent from another client is non-trivial. I've worked around this by hacking NOTICEs. It's definitely not pretty, but is the least bad way i can find. This definitely needs testing on other irc clients, and almost certainly needs a setting to customize how this display is done. 
>
>For anyone who wants to review/test this patch, i'm happy to give you an account on my jabber server which has carbons support. Just let me know.
>