Refactor 'main' into 'mainWith pipeline'.
Refactor 'main' into 'mainWith pipeline'.

The code for 'main' was duplicated in the self-contained test and I
want to reuse it.  Also, factored out the latex document generation.

ntc2/haskell-call-trace