Cancels any ongoing plannings, and releases the resources used by the planner. Implementation of AutoCloseable.close.