Move Expression::isConst into a free function
Merge pull request #3224 from yebblies/isconst

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