CRM-14951 test & fix incorrect number of terms on IPN update of memberships

@cividesk this might affect you? I think you did the num_terms?

NB - related trivial fix on CRM-14950 also included