Refs #21628 -- removed one usage of the imp module in the tests. It is deprecated in Python 3.4
Fixed Oracle query failures caused by lookup refactor

Refs #21821.
Fixed #21825 -- gis compiler uses self instead of qn for as_sql()
Allow custom querysets when prefetching through SingleRelatedObjectDescriptor
and ReverseSingleRelatedObjectDescriptor.

Allowing it enables calling performance oriented queryset methods
like select_related when prefetching through single related objects.

Refs #17001.