[DDMD] [refactor] Move Expression::castTo to a visitor class