[red-knot] Implicit instance attributes in generic methods (#17769)
## Summary
Add the ability to detect instance attribute assignments in class
methods that are generic.
This does not address the code duplication mentioned in #16928. I can
open a ticket for this after this has been merged.
closes #16928
## Test Plan
Added regression test.