Fix race conditions after starting flag reset,
make sure play state callbacks are called and only called once.
[Fix] Use shared pointer for the player in CApplication, fix double PlayFile call crash.
Change return value of PlayFile/PlayStack to support cancel detection.
Revert "Fix compile of current master branch without PR2244 merged."

This reverts commit bb75ae7b1cce556a668d74c8310a5984ff69b77a.
Detect PlayFile cancel better, any pPlayer->CloseFile() will cancel playback.
Merge pull request #2244 from ulion/fix_starting_play_state_callback_race_cond

Fix race conditions during PlayFile()