Added most group permission handling (missing PUT verb).

- Possible caching issues with adding/removing in quick succession with POST.
- Added generic deletion dialog. All removals on the page should move to use it for less redundant code.
- Cleaned up some code both client and server-side.
- Added dialog for adding group permissions. Similar should be done for users (text input instead of selection).