Add `torch_python` and `_C` library to bazel build (#38707)
Summary:
Split `generated_sources` into `cpp_generated_sources` and `python_generated_sources`
Add `shm` and `_C` library definitions
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38707
Test Plan: `bazel build :_C.so; pushd bazel-bin/; python -c 'import _C;print(dir(_C))'; popd
Differential Revision: D21654868
Pulled By: malfet
fbshipit-source-id: dd5f78c38fe58e5ab4cccd3eee42706f44af7989