Move SliceExp::toStaticArrayType into a free function
Move BinExp::scaleFactor into a free function
Move BinExp::typeCombine into a free function
Move Expression::inferType into a visitor class
Merge pull request #3297 from yebblies/cast

[DDMD] [refactor] Move member functions in cast.c into free functions