dbquery: closes redundant connection

* mod_wsgi uses one thread to import the .wsgi file
  and a second one to instantiate the application.
  Therefore we need to close redundant conenctions that
  are allocated on the 1st thread.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  dbquery: closes redundant connection

Conflicts:
	modules/miscutil/lib/dbquery.py

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>