removed lostPacketIdSet and added an atomic counter + make all threads terminated gracefully
fixed rate report could not stop error
merged with master