replace NewAlias with Join calls

Join method does NewAlias for us and it makes next code
easier to implement.

Not all NewAlias calls are replaced with Join, only those
that can benefit from explicit DISTINCT argument and
code that auto guess join DISTINCTness.
put explicit DISTINCT argument in a few places
we can auto mark Join as distinct in some cases

If we join to a table and in target table we join to id
then join is distinct.
we don't need this code

this is covered by auto marking joins as distinct
Merge branch '4.2/distinct-joins'