[IFRT] Add several commonly used APIs to `xla::ifrt::Sharding`
[IFRT] Add several commonly used APIs to `xla::ifrt::Sharding`

This CL adds commonly used APIs for sharding.
* Equality test (`==`, `!=`): Checks if two shardings have the same logical partitioning (see below) and same device assignment.
* `GetShardShape`: Returns a shard shape if this sharding always returns a single shard shape. A faste version of taking the first shard's shape from `Disassemble()` result.
* `HasSamePartitioning`: Tests if two shardings have the same logical partitioning, which is when two shardings have the same type and their own partitioning scheme is equivalent.
* `WithDeviceAssignment`: Returns a new `Sharding` of the same type, with devices and/or memory_kind replaced.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/13065 from kaixih:disable_bias_reuse_in_fp8 15f774667013045c7d8d9e38ac80a45645313b1e
