Cancels calls in flight, then closes the classifier if it is AutoCloseable. Every later call returns a canceled future.