added RingBufferHistory template class, used it in SentPacketHistory and MovingMinMaxAvg