Improve the API for memberships

- Add update method
- Fix XML structure (role_ids as array)