Destroy window context before clearing the egl surface