further fixes to toc. leaving some old toc code lying around for older dokuwiki versions