Move some LINQ helpers from CodeGenerator intoSugar