Optimize performance of the RocksDB-based persistent session. Reduce RAM usage and frequency of database requests. - Introduce dirty session state to avoid frequent mria transactions - Introduce an intermediate buffer for the persistent messages - Use separate tracks of PacketIds for QoS1 and QoS2 messages - Limit the number of continuous ranges of inflight messages to one per stream