Refactor EmitLoopCommon to make it more amenable to future extensions (#19341)
Summary:
This PR paves the way for support more iterator types in for-in loops.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19341
Differential Revision: D14992749
Pulled By: Krovatkin
fbshipit-source-id: e2d4c9465c8ec3fc74fbf23006dcb6783d91795f