normalizeOrder(order) returns an order whose items have trimmed SKUs and tags and a subtotal equal to price times quantity. All other order and item fields are preserved.
The caller keeps the original order as an audit copy. After normalizing, the audit copy no longer matches what came in: its SKUs and tags are trimmed and its items have gained a subtotal. Editing a normalized item later changes the audit copy as well, and normalizing an order that was frozen for auditing throws a TypeError.
Fix normalizeOrder in orders.js.