glthread: add marshal_call_after and remove custom glFlush and glEnable code