Add Permissions Model.

This feature is a WIP.

Future PRs:
1) Add UI for App owners to specify permissions and provide descriptions.
2) Update Core to use permissions, including having a way to populate the perms DB with core permissions.
3) Add UI for viewing permissions, including users and groups that have those permissions.
4) Add UI for assigning permissions to groups and users.
Hmm, I'm not sure what the best way to go about this is... I'm leaning towards leaving them since it's much easier to delete extraneous permissions than it is to re-add an application's permissions to all the groups.