Update interface of gmx_stats_t
The only error code returned was one that checked that there was data
points to work with. Given our style, that makes sense to implement
with an internal assertion at the point where it is necessary, and to
throw when the user input is observed to be inconsistent (ie.
requesting statistical work without providing a valid dataset).
At least one routines always returned the error code for success,
creating complexity which is now eliminated.
Used a template to permit one routine to be implemented in two
slightly different ways.
This change helps with warning-free compilation with gcc 12 by
eliminating the assertion that was only used in debug mode. It is now
always a throw, since it makes no sense to continue to report garbage
statistics in the case being checked. Now the enum class is also no
longer useful and is eliminated.
Uncovered bug #4080 which is fixed here, and backported to
release-2021 separately.