including anchor generator code from node/tools/doc/html.js and passing all nodejs anchor tests