base: wsgi middlewares reorganization

* Fixing DebbugedApplication middleware usage.

* Using an Apache environment variable to detect when to apply
  the WSGIScriptAliasFix: `WSGI_SCRIPT_ALIAS` pointing to the
  script name.

* NOTE regenerate your apache configuration by running:
  `inveniomanage apache create-config`

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
Reviewed-by:  Jiří Kunčar <jiri.kuncar@cern.ch>
deposit: WTForms version to be <2.0

* Fixing WTForms to <2.0 as Flask-WTF doesn't support it yet.

* Updating Flask-WTF to 0.9.5.

* Updating WTForms-Alchemy to 0.12.4.

* Fixing the build where _unset_value was not found.

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
search: collection template loading

* Supports collection specific templates by id "collection_{id}.html"
  with fallback to the "collection_{name}.html" and "collection.html".

Signed-off-by: Charalampos Tzovanakis <drjova@cern.ch>
sso: fix group/groups key inconsistency

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
access: fix edge cases of user info usage

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>