CRM-14758 fixes for 4.4

----------------------------------------
* CRM-14758: API ( contact, create ) does not always create related membership
  https://issues.civicrm.org/jira/browse/CRM-14758
Test fixes
Merge pull request #3623 from monishdeb/CRM-14758-44-fixes

CRM-14758 fixes for 4.4