fixed activity query (CRM-13092)

fixed activity query(for export) in accordance with the new activity contacts table structure