CRM-15207 - cherry-pick code changes to fix the Membership separate paym...

...ent bug. The modifications to CiviUnitTestCase.php are causing test failures and need to be reworked.

----------------------------------------
* CRM-15207:
  https://issues.civicrm.org/jira/browse/CRM-15207