PollEvents before main loop and beautifies codes in CCApplication.cpp/.mm.

...