Add database functionality

Change-Id: I22e914ef1ca6ec8217d131c073261b309d9f637e
Add crypto to key storage and first routes

Change-Id: Id8acb8fae0f0908a2bade4f227cd1a181b0075de
Add ticket routes and basic test

Change-Id: I4dbd23adb0bdd9011eb9a0b45e30dd862d390473
Messing with group layout

This will break some of the stuff from before and will need to be
properly rebased through.

Also tests probably don't work cause i broke stuff

Change-Id: I92aefd2ac1d9c2fa65efa13384a9390cc107b048