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.
I'm nervous about someone deleting a permission and recreating it thinking that the old one was wiped clean. I'm trying to think of things we could do to mitigate this. Maybe warn when creating a permission that users/groups already have access to? Wildcard permissions might set that off all the time though. Hmmm.