Implements a callabck which allows the user to ignore a quit event when possible.

When a quit event is received and can be ignored, it provides a callback mechanism to ask user if it should be ignored.

I have not implemented it for the x11, and egl_rpi windows because I don't know where to put it in those cases.