Adding automatic Alembic stuff

Alembic stamp and upgrades now happen automatically on server start.
Shouldn't ever have to run alembic from the command line manually.
This is causing cherrpy logging issues for some odd reason.
I'll look into it later.

Also fixed client side thread crash.