ox: Implement local table of contents
* lisp/ox.el (org-export-collect-headlines): Allow to collect
headlines locally.
* testing/lisp/test-ox.el (test-org-export/collect-headlines): Add
tests.
* lisp/ox-ascii.el (org-ascii--build-toc):
(org-ascii-keyword):
* lisp/ox-html.el (org-html-toc):
(org-html-keyword):
* lisp/ox-odt.el (org-odt-toc): Allow local table of contents.
(org-odt--format-toc): New function.
(org-odt-begin-toc, org-odt-end-toc): Remove functions.
* lisp/ox-latex.el (org-latex-logfiles-extensions): Optionally remove
"ptc" files.
(org-latex-headline, org-latex-keyword): Implement partial table of
contents assuming "titletoc" package is loaded.
* etc/ORG-NEWS:
* doc/org.texi (Table of contents): Document new parameter.