Improved logic for payment state on canceled orders. 

#5106

add more logic to outstancing balance and order updater to set the correct payment_state on the order when the order is canceled.

Do not merge yet. Need some more edge cases to make sure we have all the bases covered.