Add backend checks for batch norm (#15955)
Summary:
Fixes #15826
Changelog:
- Add backend checks in `batch_norm_cpu` and `batch_norm_cuda`
- Modify check in `checkBackend` to pass on undefined tensors.
Differential Revision: D13636410
Pulled By: soumith
fbshipit-source-id: 3b1cfe5ca8b7c0346569077163503065e75c2659