switch to Operation in register_prim_ops.cpp (#17183)
Summary:
This PR switches from `OperationCreator` to `Operation` to simplify the logic.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17183
Differential Revision: D14169829
Pulled By: Krovatkin
fbshipit-source-id: 27f40a30c92e29651cea23f08b5b1f13d7eced8c