This allows a second connect callback to be used that exposes the MQTT connect flags parameter. Closes #738, #128.