[dtensor] remove DeviceMesh typing hack guard type imports (#97889)
This PR relands https://github.com/pytorch/pytorch/pull/94526
and tries to guard the type import for older version numpy
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97889
Approved by: https://github.com/fegin