Remove unused histogram() algorithm

This removes the unused histogram() algorithm.
Add transform_if() algorithm

This adds a new algorithm named transform_if() which applies
a given unary function to an input value only if it passes a
separate predicate function.