[application] Fix invalid memory write at Application termination.

Whereas Application notified its termination to ApplicationService synchronously
it was deleted in the same call chain, so any access to Application's own data
members after the termination notification led to invalid memory read or write.

Now termination notification is proceeded within a different call chain so the
described problem is solved.