fix alert crash when related ap is deleted
ensure unsent old alerts are deleted
Merge pull request #46 from nemesisdesign/master

Alert system improvements