Fix for one error and implement .nr Footnote and .nr Illustration

Major error (line 994 on my side of diffs): Infinite loop unless this statement (i += 1) is present. I changed a "for i in range..." to a "while i <" and somehow dropped the incrementation of i. Apparently this happened after my last test run, for which I apologize. (I also apologize for not finding a way to get this single change to you without the others. Feel free to make it manually if you don't want to merge all this other stuff right now.)

Implemented code to avoid running off the end of the file while gathering caption info (.ca) for text and HTML phases.

Implemented 2 new named registers, Footnote and Illustration.

.nr Footnote will set a translation for the word "Footnote" that ppgen emits during text processing. It defaults to Footnote. Values can be any single word, or "some string" or 'some string'. It will reject and terminate if multiple words are used unquoted, or if the quotes are mismatched.

.nr Illustration will do the same for the word "Illustration". It, of course, defaults to Illustration.

Examples:
  .nr Footnote Nota
  .nr Illustration Imagen

or

  .nr Footnote "Nota de informacion"