[repo] Drop _get_session method
it's not actually necessary but holds underlying _sessions dict handling.
Drop backward compat relying on it (which IMO should not be a problem).
Drop import of unused QueryError along the way.
### Requirements for tests in various cubicweb/**/test directories. ###
## shared by several test folders
cubicweb-card
docutils
Twisted < 16.0.0
webtest
## cubicweb/test
Pygments
mock
#fyzz XXX pip install fails
cubicweb-file
cubicweb-localperms
cubicweb-tag
## cubicweb/devtools/test
flake8
## cubicweb/hooks/test
psycopg2
## cubicweb/pyramid/test
pyramid >= 1.5.0
waitress >= 0.8.9
wsgicors >= 0.3
pyramid_multiauth
## cubicweb/sobject/test
cubicweb-comment