[dynamo] Support class members in nn modules (#87531)
Fixes https://github.com/pytorch/torchdynamo/issues/1740
@voznesenskym
cc @jansel @lezcano @fdrocha @mlazos @soumith @voznesenskym @yanboliang @penguinwu
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87531
Approved by: https://github.com/jansel