Move management of calls of "cmake --build" to setup_helper/cmake.py and refactor as a CMake class
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/21493
Differential Revision: D15759279
Pulled By: ezyang
fbshipit-source-id: 157e1de36f1c5a51caf2a25b363a94369c442012