[AutoDiff] Fix `@differentiable` attribute type-checking. (#22218)
- Check whether parameter counts match in `checkFunctionSignature`.
- Previously, parameter types were zipped and checked for equality,
but parameter count equality was neglected.
- Erase dynamic `Self` type during `@differentiable` attribute type-checking.
- According to a doc comment, dynamic `Self` result types are relevant only
for checking protocol conformances. Here, it disrupts associated type lookup
and causes `getAutoDiffAssociatedVectorSpace` to fail.
- Add test, fix incorrect VJP definition in stdlib.