[TF] Change APIs to use `Int` instead of `Int32`. (#24012)
- Let `TensorShape` store `[Int]`.
- Let `Tensor` subscripts take `Int` and `Range<Int>`.
- Reduce explicit calls to `Int32.init` in user code.
- Notably, initializers taking `TensorShape` no longer need `Int32.init`.
Added two shims:
- `Tensor(_: [Int])` creates a `Tensor<Scalar>`, where `Scalar`
conforms to `BinaryInteger`.
- This is useful for `Tensor<Int32>(shape.dimensions)`.
- Overload `Tensor` subscripts for `Int32` and `Range<Int32>`.
- This is useful for `tensor[0..<x.rank]`.
- I chose not to change `rank` and `scalarCount` to `Int` for now.