libhb: Add prefiltering to nlmeans.

The prefiltered image is for weight analysis only and is not applied to output. In many cases, analyzing a roughly denoised image allows nlmeans to make better decisions and improves efficiency by as much as 10%.

Median filter is available with 3x3 or 5x5 kernel. Minor detail loss may occur when applied to luma. Other filter types may be added in the future.
libhb: Rename nlmeans function for consistency.