We have the unexpected behavior of generating the same random value
when doing something like
`SELECT gen_random_uuid(), gen_random_uuid()`. This includes cases
where the duplicate expressions come from default column values.
This change fixes this by preventing deduplication if expressions have
side-effects. The only exceptions are ORDER BY, where the order by
column is supposed to refer to an existing projection if one exists;
and GROUP BY where all instances of a grouping expression are
collapsed - this is consistent with postgres.
Fixes #44865.
Release note (bug fix): fixed incorrect deduplication of impure
expressions (like gen_random_uuid) in projections and default values.