CRM-14197 contribution form post process - set entity_id to membership id
Per discussions with @totten I am merging this as he felt that he could do relatively little QA on it & I could see that the constant rebasing of this work has been much riskier in terms of bugs than actual code changes & as I have already changed back-office flows we can't really go back.
The heart of this is the changes so that line_items have membership_id as the entity_id for memberships. rather than contribution id. The PRs leading up to this have been about getting to the point where the code made enough sense to make this change.
The key flow that still needs testing is around single vs multiple membership on the contribution page