When stop is returned in one of the functions above with Reason =
normal | shutdown | Term, terminate(State) is called. It lets the
user module clean up, it is always called when server terminates or
when wxObject() in the driver is deleted. If the Parent process
terminates the Module:terminate/2 function is called.
terminate(Reason, State)