Code for querying the datastore

Added the code to retrieve reminders from the datastore. This includes
appropriate wait times when the polling job needs to stay alive to
process reminders within the hour.