Occasional cellular data sending timeout in prvDisconnectFromMQTTBroker results in configassert

Hi Mike,

OTA demo task handles the MQTT connect/disconnect and handovers the MQTT connection to MQTT Agent task later.
MQTT Agent task handles the MQTT command, including fail reconnect to MQTT broker.

If we want to disconnect MQTT broker, it is better to do it in OTA demo task.
MQTT Agent has terminate function, MQTTAgent_Terminate. It can be used to terminate the MQTTAgent_CommandLoop. Then, we can disconnect the MQTT broker with MQTT_Disconnect in OTA demo task.

The following code can be referenced.

static void prvDisconnectFromMQTTBroker( void )
{
    MQTTAgentCommandContext_t xCommandContext = { 0 };
    MQTTAgentCommandInfo_t xCommandParams = { 0 };
    MQTTStatus_t xCommandStatus;

    /* Disconnect from broker. */
    LogInfo( ( "Disconnecting the MQTT connection with %s.", democonfigMQTT_BROKER_ENDPOINT ) );

    xCommandParams.blockTimeMs = MQTT_AGENT_SEND_BLOCK_TIME_MS;
    xCommandParams.cmdCompleteCallback = prvCommandCallback;
    xCommandParams.pCmdCompleteCallbackContext = &xCommandContext;
    xCommandContext.xTaskToNotify = xTaskGetCurrentTaskHandle();
    xCommandContext.pArgs = NULL;
    xCommandContext.xReturnStatus = MQTTSendFailed;

    /* Terminate the MQTT Agent. */
    xCommandStatus = MQTTAgent_Terminate( &xGlobalMqttAgentContext, &xCommandParams );
    configASSERT( xCommandStatus == MQTTSuccess );

    xTaskNotifyWait( 0,
                     0,
                     NULL,
                     pdMS_TO_TICKS( MQTT_AGENT_MS_TO_WAIT_FOR_NOTIFICATION ) );

    /* Disconnect MQTT session. */
    ( void ) MQTT_Disconnect( &( xGlobalMqttAgentContext.mqttContext ) );

    /* End TLS session, then close TCP connection. */
    prvSocketDisconnect( &xNetworkContextMqtt );
}