Fix Issue 9728 - Ddoc anchors non-unique across overloads 

https://issues.dlang.org/show_bug.cgi?id=9728

This keeps the first anchor the same for hyperlink compatibility, subsequent anchors get `.N` appended.

The Jump-to JS code for Phobos will need updating, I'll do that next.
Scope does not have a destructor, having OutBuffer being a value makes it rather expensive (and slow), and makes it a memory leak. Make it a pointer to OutBuffer. Then, in gendocfile(), make prevAnchor a local variable and set sc to point to it. That way, gendocfile() will free the memory upon return.