Fix unfortunate deadlock in the initialisation of the render thread.

If ensure_window_exists was called before set_video_mode, then the following
call to render_states would wait the gl_access mutex, preventing the loop to
continue and thus to effectively create the GL context in a call to
ensure_window_exists.

Now render_states() returns if m_gl_context is null.

Store the title of the window in set_title() in order to set it in
ensure_window_exists() when the former is called before the later.