Statistics builder refactored: VariableStatistics class added, more stat...

...istic types handled.