Fix this to not use .sy to generate portions of the document.
Instead, generate the necessary bits with sed beforehand.
Apparently -ms is too feeble to be able to generate tables of contents
with automatically generated page numbers, so add the expected page
numbers into the document and make it possible to turn on a
rudimentary mechanism for crosschecking them. (This mechanism still
requires .sy though. Improvements welcome.)
This makes it unnecessary to build the document twice, or to use
groff in unsafe mode.