dbquery: more reinstall-friendly dbquery

* Makes dbquery more reinstall-friendly by means of creating
  dbquery_config file that is not erased while `make install`
  process runs (which may be possibly lengthy).  It only changes
  by `inveniocfg --update` family of statements.

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebStyle: SimulatedModPythonRequest port

* SimulatedModPythonRequest now uses ResponseStreamMixin from Werkzeug
  to simulate correct behavior of methods `write` and `flush`.

* This fixes problems with file streaming in bibdocfile.

* This also allows developers to debug legacy Invenio applications with
  Werkzeug debugger.

Tested-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'master' into next

* master:
  dbquery: more reinstall-friendly dbquery

* Merge note: amended importing of CFG_DATABASE variables in
  SQLAlchemy to use dbquery, not config.