livestatus: implement avg,min,max,std,invsum,invavg stats aggregators

fixes #4398