Calculate tax total correctly which depends on the item that could be an...

... Order or a LineItem. Tax adjustments are stored differently in these two cases.

This fixes https://github.com/spree/spree/issues/4829