[dynamo] Guard on nn.Module dicts and type
The NN_MODULE guard now subsumes guards on Module attributes. The
check_fn will fail if the module attributes are changed (such as
Module.training), parameters, submodules, and buffers are added or
removed, and if fields are changed on the type itself.
This gives up specificity in the guard check -- if any field is changed
the check_fn fails -- for faster overall checks.