Created C macros for summing CF weights and setting the mask threshold

Introduced two new macros to handle weight summation, calculating the
norm_total for each CF and to globally the define the mask_threshold
below which the weight is disregarded during weight summation. The
threshold was updated from 0.000001 to 0.5 for more robust comparison
but may break backward compatibility for models that use smooth CF
weight masks.