New class for statistics

The statistics class computes statistical measures and performs I/O.