comment/refactor statistical summary print

Add comments explaining the code that prints the statistical summary.
Still need to add more comments to the rest of it, but it's a start.
Also change the long `if` statement comparing `$n` with `pointermax`
to simply use `bigcmp`, which is much clearer.