Attempts to fix many of the compatibility issues with MQTT highlighted by AMQ-5043.