StateMachine: State table recording func transition

Signed-off-by: Chris Evich <chris-cxx@anonomail.me>
MovingAverage: Constant-time items in, avg out

Signed-off-by: Chris Evich <chris-cxx@anonomail.me>