Initial badge system implementation

Sorry about the huge diff, will be sure to keep it smaller in the future.

This implements:

* Backend models and stuff
* API for granting / revoking badges
* Admin UI for creating badges