Cart: Fix for discount calculation bug

Quanity was not always taken into consideration when calculating actual
amounts. This commit fixes that.

Also adds test for verifying the correctness of the logic.

ping @MrShish 
![mind-blown](https://cloud.githubusercontent.com/assets/108077/3552551/e6f7e4f0-08f8-11e4-9d7d-6c5fb922ebef.jpg)