Avoid duplicates of carbon copies

When multiple resources have the same (highest) priority, the session
manager routes messages sent to their bare JID to each of these
resources.  When another resource has a lower priority but receives
carbon copies, make sure it won't receive multiple copies of such
messages.
Merge pull request #335 from weiss/avoid-carbon-dups

Avoid duplicates of carbon copies