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
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
For example, the following declarations have the same USR with a single ERROR_TYPE parameter despite being distinct declarations.
```swift
func bar(body: Invalid) {}
func bar(ignoreCase: Bool, body: Invalid) {}
```
We originally intended to check the USR so that local rename behaves more like global rename, which also looks symbols up by USR. But the above example proves that assumption wrong.
rdar://126803702
It's not clear that its worth keeping this as a
base class for SerializedAbstractClosure and
SerializedTopLevelCodeDecl, most clients are
interested in the concrete kinds, not only whether
the context is serialized.
The `NameMatcher` implemented in swift-syntax as slightly different semantics because it consideres `(callable.|callAsFunction)(x: 78)` as a reference to `callAsFunction` instead of a call with argument labels `(x: 78)`, which means that one test needs to be updated.
We should (and do) have one new name for the entire rename operation, not a separate new name for different positions at which the renamed symbol occurs.