[Runtime] Application should be terminated before uninstall or update.

The running application should be terminated when intend to uninstall or
update.

BUG=XWALK-945
FEATURE=XWALK-1060
Merge pull request #1625 from takethathe/terminate

[Runtime] Application should be terminated before uninstall or update.