Added coverage and adjusted the logic in stock_item.conditional_variant_touch to make the necessary touch in the case that a new stock location is created.

Closes #5228
upgrade paperclip

Closes #5230