Only check quantity permissions if > 0

This allows removal of products in the basket if they are not in stock
by setting the quantity to 0
Add tests for BasketLineForm
Merge pull request #1222