Makes constant SymInts hashable and fixes DTensorSpec hashing under dynamic
shapes, re-enabling test_ddp_tp.
SymInt.__hash__ hashes by value when expr.is_number; symbolic SymInts keep
raising TypeError (einops relies on it to bypass its lru_cache).
DTensorSpec._hash_key recursed into symbolic shape/stride SymInts and raised
unhashable type: non-nested SymInt (the actual test_ddp_tp failure); each
dim now maps to a hashable surrogate (int for constants, str for symbolic).
The spec hash only buckets the sharding cache, with __eq__ authoritative.
Pull Request resolved: #185190
Approved by: https://github.com/ezyang