References associated with a `VarDecl` had no `RelationContainedBy` role, resulting in "orphaned" references. From the perspective of identifying unused code (in tools using the index, like [Periphery](https://github.com/peripheryapp/periphery)), this made it impossible to identify that a variable's type, initializer and custom attributes are associated with the variable.
Resolves: [SR-13766](https://bugs.swift.org/browse/SR-13766)
For code like
```
_ = type(of: x).A.self
```
the `A` type reference is written explicitely by the user, but the AST created using `TypeExpr::createImplicitHack` is hiding such a reference,
making the reference invisible to semantic functionality like 'rename'.
rdar://56885871
SourceEntityWalker is generally ignoring implicit AST nodes but we missed ignoring implicit patterns.
This had the effect of not ignoring implicit pattern matches to Optional.some() which resulted in
cursor-info returning Optional.some instead of what is actually written in code.