Support shape transpose in `hlo_sharding_util::ReshapeSharding`.
Support shape transpose in `hlo_sharding_util::ReshapeSharding`.

Before this cl, `hlo_sharding_util::ReshapeSharding` can handle the cases where source and target shapes can be transformed to each other by merging and splitting dimension sizes. It returns `std::nullopt` if transpose is needed between source and target shapes.

This cl extracts the `gcd(source_sharding_tile_size, target_shape)` when `source_shape % source_sharding_tile_size == 0` in the major dimensions. We also skip the source_dim if `source_sharding_tile_size` is 1. An example is shown below.
```
input_shape: [6, 2, 5]
output_shape: [4, 3, 5]
input_sharding: {devices=[2, 1, 5]<=[10]}
output_sharding: {devices=[2, 1, 5]<=[10]}
```
