fix OSS mobile CI (#25755)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25755
PR #25721 breaks mobile CI (with USE_STATIC_DISPATCH=1) due to circular
header dependency.
Move 'ATen/core/Tensor.h' back into '#ifdef BUILD_NAMEDTENSOR' to work
around the CI issue.
Test Plan: - build android library locally
Differential Revision: D17223997
Pulled By: ljk53
fbshipit-source-id: d8b5fd26e332953f1b592758fc76947ea2af94dc