Add database functionality

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

Change-Id: Id8acb8fae0f0908a2bade4f227cd1a181b0075de
Starting to add tickets

Change-Id: I022c2a930a149637328683f516602c2e29d80f48