modified send_notifications_for_cert routine to decrease db load

Rather than making a query for each device, we can get all unsent
notifications for a given app with one SQL query.

The change also required a slight update of the app_spec.
specify :select in find to avoid :read_only

The APN::Notification.find call returned read-only ActiveRecords, which
can be prevented by specifying :select.

-> see http://stackoverflow.com/questions/639171/what-is-causing-this-activerecordreadonlyrecord-error
Merge pull request #1 from Shoptap/merge-pr-25

merge fix for N-selects performance bug in main delivery loop