zero initialize some members and other fixes (#59915)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59915
Reviewed By: soulitzer
Differential Revision: D29106684
Pulled By: ezyang
fbshipit-source-id: 713cbdf10866017ee715ee89ec82acb592c769b6