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
Fix "make install" without JSON support

Don't bail out during "make install" when ./configure was called without
"--enable-json".
Merge pull request #337 from weiss/fix-install-without-json

Fix "make install" without JSON support