AST: Fix ProtocolConformance::getWitnessDeclRef()
This method was only ever called with non-generic witnesses,
because it assumed the substitutions stored in the witness
would always be derived from the conforming type.
There were two cases where this wasn't the case though:
1) If the witness is itself generic
2) The witness was defined in a protocol extension and the
conforming type is a non-final class
In all cases, the SubstitutionMap stored in a Witness always
uses the 'synthetic environment'. In some cases, the
'synthetic environment' is the generic environment of the
witness. But in 1) and 2) it was different. While 1) never
occurred because we never used this method to look up
witnesses for generic requirements, 2) could happen.