tools: build API TOC using raw headers
Markdown interprets the syntax for optional arguments as a form of a link, so instead of trying to build up the contents using the node value, grab the raw original markup instead.
Fixes regression noted in https://github.com/nodejs/node/pull/21490#issuecomment-406785023
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines