Revert "[Profiler] Move legacy profiler out of `torch/csrc/autograd` (#85512)"
This reverts commit 157a3d2a7cd25779258f3e3dcef14633f1930103.
Reverted https://github.com/pytorch/pytorch/pull/85512 on behalf of https://github.com/DanilBaibak due to Due to files were deleted, the internal build failed. Please re-submit via codev.