Ec refactor

Part 1 of refactoring elliptic curves/Q module:  move all couting & stats functions to a new ECstats class.  No change to website appearance or function, just a tidier back-end.