Show terms more prettily

Now, a different pretty-print renderer is used for showTm. This should
improve display in various places in the code that don't yet work with
pretty-printer documents natively.

RE #1019 , this seems to fix the printing problem but not the IBC problem.
Merge pull request #1040 from david-christiansen/issue/1019

Show terms more prettily