extract caffe2.proto to its own library (#97613)
This reduces the footprint of the caffe2_pb library.
Differential Revision: [D44400083](https://our.internmc.facebook.com/intern/diff/D44400083/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97613
Approved by: https://github.com/PaliC