Fix/admin users form

This (partly) addresses some issues described here: https://www.openproject.org/issues/1843. Basically, those stem from our previous use of prototype. Also, this contains some tests for memberships CRUD inside the admin panel.