Fix Range.all_products() inconsistency with contains_product()
This change fixes the inconsistency with range.all_products() which
didn't check for exclusions when includes_all_products is set
Every other bit of oscar expected range.includes_all_products means
that all products are included, no questions asked. The dashboard
interface even hides the option to edit/remove individual products.
The short circuiting in ConditionalOffer.products() is removed so
the range.all_products() logic is applied consistently.
Optimize category retrieval for ranges: limit selected fields
When packages like oscar-wagtail redefine the Category model,
it can include a lot of extra CMS field data. These affect the
performance of the range lookups, while only a few fields are needed.
Optimize Range queries for contains_product() and all_products()
Cache the categories, so a range can be tested against a set of products
without refetching the categories all the time.
Also avoid querying product.get_product_class() as the Range.classes is
typically empty (it's not exposed in the Oscar dashboard interface).
It could even avoid another query if there was an API like
product.get_product_class_id() but this could cause compatibility problems for
projects that override product.get_product_class()
The range.all_products() uses range._category_ids() which performed 2 queries
where it only needs one, and can now reuse cached data.
Calling range.is_reorderable also fetched unneeded children, but this was
hidden in the RangeProductListView due to the reuse of cached data.