Detects `QuerySet.extra` select & where arguments and avoid caching such queries.

Also fixes tables detection so that creation/deletion correctly invalidates queries.