Bug 907629 - Notify STK application when Settings is about to get killed

It seems like doing it in the onunload callback is already too late, and
it makes the STK behaving wrongly.
Merge pull request #11664 from lissyx/bug907629

Bug 907629 - Notify STK application when Settings is about to get killed, r=frsela