reminder fixes for CRM-12274

reminder query clean up for activity