Ensure that all state transitions for shipments and payments are tracked

Fixes an issue seen in #4072
Move shipments JS out of variants_autocomplete.js and into shipments.js