various db fixes (in particular addressed issue: https://github.com/globaleaks/GlobaLeaks/issues/569)
fix against issue https://github.com/globaleaks/GlobaLeaks/issues/570