[XLA:CPU] While emitting IR, don't ignore layout of constants when checking for duplicates.
[XLA:CPU] While emitting IR, don't ignore layout of constants when checking for duplicates.

Fixes https://github.com/openxla/xla/issues/8471.

The issue only reproduced in ≈3% of runs, because the hash used for the `flat_hash_map` does include layout, but the equality check didn't. So the issue only showed up when two layout happened to be in the same hashmap bucket.

The Literal's `operator==` intentionally doesn't compare layouts (according to the function's comment).
