CRM-13283 fix - Number of terms does not update the end date of membership

https://issues.civicrm.org/jira/browse/CRM-13283
CRM-13973 : #comment-59275 fix
CRM-13973-comment : intial financial_item entry of multiple entires being recorded during 'cancelled' status update on contribution (linked to participant) has amount = total_amount (which is incorrect)
CRM-13973-comment : handled 'Refunded' status logic during Status edit of a contribution
Merge pull request #2862 from pratik-joshi/CRM-13973-comment

CRM-13973 : #comment-59275 fix
Merge pull request #2864 from monishdeb/CRM-13283

CRM-13283 fix - Number of terms does not update the end date of membership