Add tracking of single-/double-buffering
This adds the state part of 04f21abb52e557addb932af1634b29658fd3a6ae
(Make GLFW_DOUBLEBUFFER a window attribute), but without the associated
API change, because this is needed by later bug fixes that will go into
the stable branch.