do not refresh page when editing memberships

previously when you edited a membership this caused the whole page to
reload which could result in losing data if you were editing names etc
so instead we do all the updating by ajax and add the new elements in
place.