Add Mutex to make SharedBuffer thread safe
Fix broken ReliablePacketBuffer insert code
Fix resent and directly processed packets not removed from ReliablePacketBuffer too