Basic img_proc module revision and re-org using API option

Reorganized the thresholding, histogram, morphology and filter operations so that all direct imports are removed and now loaded via the api.

Remaining tools to follow.
I would use the above function for this (I bet it is faster as it should only need one pass over the raw data and does not require allocating an array of ones).