Avoid using bottom-up cerl_trees:map/2

We can't use a bottom-up transform function as fun bodies need to be
transformed to a let expression before the primops using the variables
from the let.