CRM-13812#COMMENT-54485

This consists the fix for  : 

https://github.com/civicrm/civicrm-core/pull/2079#issuecomment-29386310
https://test.civicrm.org/job/CiviCRM-4.4-git/LABEL=debian6,SUITE=CRM_AllTests/197/testReport/

appropriate changes done for : 

- we need source_record_id (in code at various places), i think this was removed by mistaken consideration of source_record_id as source_contact_id
- INNER JOIN was applied and ON clause had restricted fetching of activity contacts to only source, so search for  target / assignee contacts was not taking place - thats why some 'count related' failures in CRM tests.
- some code improvement.