fix expansion cost of pure functions
Expansion cost of an expression should be a monotonically
increasing function of its sub-expressions.
Here, for the costs of calling a pure function, the costs is
reset to zero (wich is used when the expression expand to
a constant/to test if the expression is a constant or not).
Fix this by setting the cost as the total expansion cost of
all the arguments plus one for the function itself.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>