Make Lazy shape/dtype inference functions reusable (#67025)
* Make Lazy shape/dtype inference functions reusable
- Add docs about how/why to write these
- We want to share these hand-written implementations between lazy backends
- But if different backends support different ops, it means the .cpp may
have more functions implemented than the autogenerated .h has. So we
can not use the trick of making these static methods in a class, in
order that the compiler tracks which impls are no longer needed.
- Alternative would be that each backend maintains a copy of the
handwritten file, but gets a compilier error when a structured kernel
is implemented which deprecates one of these functions