Wrapping it around the Pyramid application makes SSL work. Since it also does
things with the strict transport security headers, I kept it this way for now.
Most probably we can shrink it to only contain the htsts things and use the
prefix middleware of paste.
Based on this setting the crypto backend is selected: brypt or md5.
During tests md5 is used to sppedup test execution. We have to move this
setting up to the pyramid layer otherwise the test DB init will use bcrypt
and the tests use md5. This will result in test users not able to login.
- DB init sets rhodecode.model.db.ENCRYPTION_KEY
- Test env setup resets rhodecode.model.db.ENCRYPTION_KEY to None
- Therefore DB init has to be done after test env setup.