Avoid hitting the database twice for primary image
Simplify validation of saved basket

Before this commit, all products of Lines in the saved basket would be
checked for availability on each action, even on unrelated actions
like deleting a line or moving another line to the basket. This was
mentioned in issue #666.
This changeset only does the availability check if the Line is to be
moved back to the basket.

I refactored the fields list for SavedLineForm from blacklisting six
fields to whitelisting two field for clarity reasons.

Fixes #666
Reduce query count for product list page

Avoids lookups like that are essentially
"product.stockrecord.product" by passing both the stock record and
product where appropriate.

move product arg to the end, to not break existing code, if any
Add AbstractProduct rating calculate function
Merge branch 'f/rating_calculation'