Move out all statistics/debug related code into an inner Statistics class. Patch submitted by Adrian Cumiskey (fop-dev AT cumiskey DOT com)