CRM_Contribution_BAO_Contribution - Fix test failure

Test failurewas  observed on toj-1 (Ubuntu 12.04) with paratest.

https://test.civicrm.org/job/CiviCRM-Core-Matrix-exp/CIVIVER=4.5,label=toj-1/8/testReport/%28root%29/CRM_Batch_Form_EntryTest/testProcessMembership/
CRM-15198 - CRM/Core/EntityReference.php - Fix syntax
Merge pull request #4450 from totten/4.5-test-fixes

INFRA-124 - Misc fixes based on paratest failures