Added several new abilities to stat_statements.sh, specifically, to work with streamin replicas, to track IO time and order by it, and to clean old statistics. Also made a number of minor optimizations and improvements.