dbquery: switch off GC during SQL execution
- Switches off temporarily Python cyclic GC during SQL query execution. This speeds up generating tuple-of-tuples that the run_sql() returns, avoiding Python GC issue http://bugs.python.org/issue4074.
- The temporary switch off/on of the GC is done regardless of the Python version as per the tests performed at http://invenio-software.org/wiki/Talk/PythonGarbageCollectionIssue.
Co-authored-by: Tibor Simko <tibor.simko@cern.ch>