Terminate the app when the CEGLView is ended

CEGLView end() is called from the CCDirector's
end() method, so we should terminate the app then.