upgrader: fix auto-generation of upgrades

* Fixes an issue with wrong upgrades being generated
  due to all SQLAlchemy models not being loaded.

* Adds option to create recipe command to overwrite the
  upgrade file if it already exists, as well as naming it
  from the CLI.

* Fixes an relative import bug in pre/post checks.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
JSONAlchemy: improve tests and bug fix

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>