Destroy the window after the GL context.

The GL context is bound to a window, so destroy it before the window and
not after it. While here update the header comment.