[DDMD] [refactor] Move Expression::integralPromotions into a free function