Bug 916580 - Fix bugs related to the usage of calloc. r=luke, a=akeybl
Bug 919532 - Make sure we don't lose state when quitting early without being notified. r=Yoric, a=akeybl