[XLA] Clear derived instruction's sharding only if shapes are incompatible.
[XLA] Clear derived instruction's sharding only if shapes are incompatible.

When AlgebraicSimplifier calls `dot->SetupDerivedInstruction(new_lhs);` in HandleDot, lhs sharding was cleared when dot didn't have a sharding. With this CL, lhs preserves its sharding because the condition for clearing the sharding is narrowed down to only when shapes are incompatible.
