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 
A negative amount of percentage on a discount would make it a "top-up" or something, eg adding an extra cost to the total amount. So this would result in 100+15, and the inverse (an inversed topup will again be a discount, aight) would be -100-15. All good?