CRM-15527 fix crash on membership renewals due to ->id not being set

(NB was originally written against CRM-15444 but I decided to track separately - hence ref to that number in the commit list)