guard against extreme memory consumption

Instead of fetching all unsent notifications, we only fetch their ids.
Once we have the ids, we process them in batches of 1000.
Merge pull request #4 from teamsnap/guard-memory

guard against extreme memory consumption