inferTensorEncoding
Infer a TensorEncoding from a concrete TensorData instance, or return null when the layout is dense / unknown. Single source of truth for the data-subclass → encoding mapping so trace builders and loaders agree.
Any TensorData implementing PackedBlockStorage already exposes its own encoding, so this helper is one line today but centralizes the contract for future non-packed quantized layouts.