Introduce AstType.ANY and TypesUtil.getJoinType (with tests).
Deduce common supertype for values mapped to the same field.