Bumptrees for Efficient Function, Constraint and Classification Learning