Use universal references and perfect forwarding in Loops.h. (#30466)
Summary:
This simplifies the generated code a bit, saving about 40K off of libtorch.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30466
Differential Revision: D18836215
Pulled By: resistor
fbshipit-source-id: ad75c9e04783bb29cc06afd2022f73f9625dd52b