Order expression args by count in ExpressionWalker

When assembling expressions, we did not enforce any ordering of the arguments,
which made the caching less efficient since we could end up with several
versions of the same expression kernel the were identical up to a permutation
of the argument names.

We solve this by returning the expression arguments sorted by their count from
ExpressionWalker.