(NC-162) Create groups with posts.

Add the capability to create a group by POSTing to the groups collection endpoint. This is done by reusing the group-resource function, but passing it nil instead of the UUID from the URI (since there is none).

Since it can now be passed nil, group-resource needs to check if the uuid argument its given is nil before using it in a few places.

There's a bit of other refactoring / improvements going on in here; see the commit messages for more detail.