[TensorExpr] Add error checking in mem_arena (#59922)
Summary:
Gives an error message (rather than a segfault) if you forget `KernelScope()`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59922
Reviewed By: bertmaher
Differential Revision: D29091303
Pulled By: jansel
fbshipit-source-id: a24ee2385cae1f210b0cbc3f8860948fc052b655