LaTeX writer:  Avoid problem with footnotes in unnumbered headers.

Closes #940.
Added test case.
Shared:  stringify now skips over footnotes.

That is usually the right thing to do for section labels, etc.