Better error messages for unclosed blocks at end-of-file

Updated doLit to check for unclosed .li (which was only partially checked,
before, during footnote handling in HTML).

Updated footnote handling in text to skip over .li blocks.

Updated doDef to detect unfinished .de (command continued at end-of-file).

Removed superfluous "i += 1" in a "for" block.
Merge branch 'develop' of https://github.com/wf49670/ppgen.git into develop