Bug 911621 - Ensure that XPI and AddonRepository JSON is completely written before shutdown. r=Unfocused