autolink: support explicit link to entities within current scope

This commit recognizes a prefixed hash (like #classname) as an explicit
link to a classname or other entity even when the name is entirely
lower-case, without also changing the references to be in global scope.

It does so by stripping a leading hash from the reference name prior to
substituting :: for hashes in the remainder.

Since (a) src/docparser:handleLinkedWord() will re-invoke resolveRef()
in global scope if the scoped lookup fails, and (b) resolveRef() checks
the unmodified name (which includes the hash) when checking for
all-lower-case strings that should not be links, this allows reference
to all-lower-case class names and other entities in the current
namespace without explicitly specifying the local namespace.