CTR: documentation webapp
Align algorithm that generates anchor names in Tomcat documentation with Tomcat 7/8/9:
- Simplify an XPath expression.
- Change algorithm for generation of unambiguous anchor names.

For current Tomcat 6 this does not change anything in generated documentation, but it should help with future backports.

Merged revisions r1643585 and r1643586 from Tomcat 7.
(r1643581 and r1643582 of Tomcat 8, r1643045 and r1643054 of Trunk)

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@1643611 13f79535-47bb-0310-9956-ffa450edef68