Dry-coded the invitations feature.

There's a levelgraph db to track invitation relations and a controller
to manage it all with a sensible API for the app itself. The invitation
model is mostly just data.