Flask-SSLify: fix url standard ports rewrite

* Fixes problem with rewriting secure site url running on standard
  port where the port number is included in CFG_SITE_URL (e.g.
  http://localhost:80 -> https://localhost:443).

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
celery: fix issue with undefined database

* Fixes an issue where the database in certain cases where not
  defined, which caused an exception when a celery worker was started.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>