fixes for CRM-14004, duplicate memberships

----------------------------------------
* CRM-14004: Membership export includes multiple copies of the same membership
  http://issues.civicrm.org/jira/browse/CRM-14004
Merge pull request #2257 from kurund/CRM-14004

fixes for CRM-14004, duplicate memberships