V.2.0 upgrades

Here is an attempt to fill inn the gaps of the upgrades from v.1.x to v.2.0.

Running alembic after applying these on a master installation, gave the following output:
https://gist.github.com/jalavik/66d909e00d12ee2be3fe

Most of it are not applicable, except maybe the column change in the `tag` table, but I am not sure if this one is necessary..

Touches #1613
OK, let's do it like that.  I have some SQL structure comparison script that I planned to run to detect differences WRT part one, so let me have a look.  I'll post results into #1613.