Optim foreach cleanup for AdamW (#70484)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/70484
Test Plan: Imported from OSS
Reviewed By: anjali411
Differential Revision: D33767869
Pulled By: mikaylagawarecki
fbshipit-source-id: 2f5273bbfeea3ed502c5d77da4bebe1674243e86
(cherry picked from commit 2dd9b77917d67223012cfe1719d0919a422c5428)