DOC: run doxygen separately for internal/external API

Also only install the external API on gh-pages.
DOC: fix various doxygen comments