Fixes the bug that OpenGL view may failed to redraw.

This commit fixes the bug that OpenGL view may failed to redraw in Mac and iOS. Now it skips the "needs redraw" situation only if the display link is still working.

In iOS, the view does not register the display link if the application is not active. However, [UIApplication applicationState] may always says the app is inactive while launching the app, and causes the situation where nothing is not rendered after launched. This commit adds a `_is_active` property to control the state manually.