Ddoc should output qualified anchors for template members.

Fixes [issue 10366] (https://issues.dlang.org/show_bug.cgi?id=10366).
Add tests for issue 10366.
Update ddoc test outputs to have qualified anchors.
Merge pull request #3693 from quickfur/ddoc_qualified_anchors

Implement ddoc qualified anchors for template members