CRM-14036_fix

In upgrade we were not adding constraint rule for civicrm_activity_contact table. That the reason why contacts are being deleted without deletion of civicrm_activity_contact entries. 

handled upgrade so that, foreign key constraint rule exists and also deleted un-mapped records WRT contact_id and activity_id.