Implement DB migrations [closes #16]

Mostly pulled from `mozilla/badgekit-api` with the necessary tweaks to make it work for this project. This also includes the initial migration.