Remove `using namespace torch::autograd` from header files (#34423)
Summary:
This PR prevents leaking symbols from `torch::autograd` namespace to the root namespace.
Fixes https://github.com/pytorch/pytorch/issues/34371.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34423
Differential Revision: D20338404
Pulled By: yf225
fbshipit-source-id: e7ff3348193667a0cee5d38f9a003ae36cc704ca