[feature] Switch to dynamic allocation of mqtt_layer buffer