[feature] Use a dynamic buffer for xi_mqtt_layer_data_ready

In this new version, I don't use my own function to calculate the size of the message. I was also allocating the data_descriptor statically and the buffer dynamically, which caused problems.

Everything is up and running now, and there are no memory leaks.