[Core] Handle better inventory units on cart change

This PR fixes 3 issues:

* First, inventory units weren't deleted when deleting an item from the cart.
* Second, there was the assumption that each CartItem have different variants attached. But this depends on how you implement the `CartItem::equals` method (in my project I can have 2 items with same variant).
* Third in `removeInventoryUnits`, you cannot walk over a collection that way, indexes are not always contiguous.

I'm not that happy with my implementation with 2 array $quantities and $variants, but I had no choice as I can't put a Variant object in array index. If you have any better idea...