Ported hardtanh decomposition to ref (#78689)
One note:
The logic for handling scalar boundary conditions seems to be a bit different than other ops - I simply copied the ATen logic (https://github.com/pytorch/pytorch/blob/hardtanh_ref/aten/src/ATen/native/Activation.cpp#L370). Not sure if it's an inconsistency we should fix.
Will add error opinfo after figuring out the scalar boundary condition stuff.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78689
Approved by: https://github.com/mruberry