fixed #4547 :Add application foreground and background status JSB support.