Relocate calls to proof measurements

Previously all output proofs had to be kept in memory, in order to be measured later.
Now we measure them as they are produced, and then we can implicitly discard and garbage-collect them.