Turn on strict typing for dynamo with Pyrefly (#171487)
Summary:
Final step in type coverage for dynamo - turn on strict typing (implicit-any) and fix misc issues
This will require all functions to have typehints, ensuring dynamo codebase is readable/maintainable
### Test:
```
pyrefly check
```
results in
```
INFO 0 errors (11,607 suppressed)
```
X-link: https://github.com/pytorch/pytorch/pull/171487
Approved by: https://github.com/williamwen42
Reviewed By: jeanschmidt, atalman
Differential Revision: D90213553
fbshipit-source-id: 9cb3131d1b9543e226a961a522616500853f6a4f