nir/constant_folding: add back and use constant_fold_state