User edit & add endpoints cleanup

- edit and add endpoints don't assume role
- edit and add endpoints cope with no role, role objects, and strings
- resend user invite was failing at one point due to no role being sent, but this shouldn't be required
- other random api cleanup
Merge pull request #3475 from ErisDS/api-clean

User edit & add endpoints cleanup