Cart: Adds test for inverse item line discount

As the inverse method was implemented in the `TestItem`. an inverse
operation would have produced an unexpected total value.

This change adds a test that fails with the previous implementation, and
also changes the inverse implementation to take discounts into
consideration, which makes the test pass.

This one is a minor, and just for making the tests more correct.  

ping @softarn