Fix problem with long messages in Qpid

Qpid has a limitation where it cannot serialize a dict containing
a string greater than 65535 characters.  This change alters the
Qpid implementation to JSON encode the dict before sending it, but
only if Qpid would fail to serialize it.  This maintains as much
backward compatibility as possible, though long messages will
still fail if they are sent to an older receiver.

Fixes bug 1175808

Change-Id: I5d104e099f523508dae2b657f7d06d96984b10f0
Enable H306 hacking check.

H306 - imports not in alphabetical order.

Change-Id: Iaa93bcafed562833318ac86241ad36662c2d8ca6
Merge "Enable H306 hacking check."