avoid overwriting selected shipping method but not clearing the cart on every page view

Replaces some code missing from previous merge
Don't clear out selected shipping method with cart clear on every page view
Don't overwrite selected shipping method with default unless selected shipping method is invalid