Between the creating of a function op and adding it to a module it has no
explicit owner what can lead to memory leaks. The new class is intended to be
used as a convenient RAII owner for that time.
This change generalizes the code for OwningModuleRef to support arbitrary Op
types and makes OwningModuleRef and OwningFuncRef a simple shim around the
generic class to still enable forward declaring these types.