Exclude training support from BatchNorm in minimal build (#8939)
* Exclude changes to BatchNorm that are training specific from minimal build.
Previous changes [excluded](https://github.com/microsoft/onnxruntime/pull/7704) training specific code but that was recently [undone](https://github.com/microsoft/onnxruntime/pull/8269) to support a pytorch CI need that isn't relevant to minimal builds.