Add an overload of setConditionFunction() that takes boost::function

Previously only function pointers were allowed, which made it impossible to use class member functions as conditions for Euclidean clustering.