Introduce --enable_training_ops build flag (#6523)
* minimal_build with training ops
* Removing redundant comment from an earlier attempt at a fix
* Fixing a bad merge conflict resolution
* Responding to PR feedback
* tweaking the makefiles based on feedback
* combining two enable_training blocks in CMakeLists.txt