Add a flag to control how broadly aliases are available in GROUP BY / ORDER BY / HAVING

By default, this is off, which means that the alias alone may be used in GROUP or ORDER BY, just where a column ordinal literal may be used.

If turned on, get something closer to MySQL behavior, in that aliases are allowed in HAVING an in expressions in the others. But it is not fully compatible in the ambiguous cases (alias has same name as real column), where it may choose something illegal or prefer the alias. But it is no worse than it was before.