Remove objects matching pattern, by chunks of 1000 to be efficient.
Set callback to a function returning True if given object has to be removed.