Track the original-decl/captured decl as part of the symbol passed to the IndexConsumer. This allows the Rename consumer to check if the symbol is a shadowed reference to a decl being renamed, without the index skipping the other relevant output when visiting shadowing variables.
https://github.com/swiftlang/swift/issues/76805
The declaration and reference aren't necessarily the same type (eg. they
could be a function and a local). Thus they don't have to have the same
names, making the assertion invalid.
Resolves#63262.
Skip the shadowing decl and instead reference the top-most shadowed decl
(ie. follow any shadowed decls up the chain).
Also fix `getShorthandShadows` missing references in `MemberDeclRefExpr`
by using `getReferencedDecl` instead of assuming it is a `DeclRefExpr`.
Resolves rdar://99730146, rdar://100006415, and rdar://103449038.