backend cart + cleanup

This is the backport of spree/spree#5132, with some cleanup.