Fixed #17001 -- Custom querysets for prefetch_related.

This patch introduces the new Prefetch object that can be used to customize
prefetch operations.

Among other things this enables filtering the prefetched relation, calling
select_related from the prefetched relation, or fetching multiple times the
same relation with different querysets.

When a Prefetch instance specify a to_attr argument the result is stored
in a list rather than in a QuerySet. This has the happy coincidence of being
significantly faster than traditional prefetch. The preformance improvement
is due to the fact that we save the costly creation of a QuerySet instance.

Thanks @akaariai for the review and the original patch.