Don't crash if there is no address to associate

Rather, just to nothing. This fixes
https://www.honeybadger.io/inspector/p/33720/5871315
Deleted the continue button on the RMA index

Deleted the continue button on the RMA index.
It does not have any function there.

cherry-picked from b2bca2adf78ec221083a2f06ce2a9aa0630f20cd in spree master
Default credit card per user

When an order is completed, we save the credit card used as the user's
default credit card. When creating a new order, we use an existing
credit card (if it exists) and attach it to the order before reaching
the payment state.

cherry-picked from e891bf56dcbe188dd485e1a95da8445c23a9000e in spree master
Enable default credit card work in storefronts
Revert "Enable default credit card work in storefronts"

This reverts commit b85dfdc1dcf0d628a2eb69e0337864975142a25b.
Revert "Default credit card per user"

This reverts commit 1b535699650c337f1353b381e804f6712c2da298.
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.
Add API endpoint /api/shipments/mine

With expedited exchanges we now have times when stores will be interested in deep details of a single shipment, without having to grab all the details of all shipments in an order.

Trying to prevent a bunch of n+1 queries with a bunch of includes.

Conflicts:
	api/config/routes.rb
	core/app/models/spree/shipment.rb

2-2-dev changes:

  - restrict "2-2-dev"-specific before filters

cherry-picked from pending PR in spree master: https://github.com/spree/spree/pull/5219
Add postal code validation using the Twitter Cldr gem

Closes #5079

Conflicts:
	core/app/models/spree/address.rb
New paradigm for customer refunds

Initial step in a larger piece of returns & exchanges improvements.

Major

* new "refunded" state for return authorizations
* separation of refunds from payments
  * add a new refund model
  * use "refunds" in place of negative payments
  * stop generating order adjustments when receiving return authorizations
      * we no longer need to create order adjustments in order to provide refunds
* updated admin ui
  * added a "refund" button in the return authorization flow
  * list refunds along with payments
  * add payment identifier column to payments list

Minor

* extra validation on `ReturnAuthorization#force_positive_amount`
* improve some existing specs by using real `ActiveMerchant::Billing::Response` objects instead of doubles

Generated by @jordan-brough & @richardnuno

Fixes #4883

Conflicts:
	core/app/models/spree/return_authorization.rb
	core/spec/models/spree/return_authorization_spec.rb
Take adjustments into consideration when calculating RMA totals

* Added #total_per_item to line_item that calculates total per item including adjustments
* Added new column in the RMA admin screen to display the total per item for a variant
* Updated javascript that suggests the RMA total to use the total per item when calculating

Fixes #4895
Rework ReturnAuthorization-InventoryUnit relationship

* Create a join table: `ReturnAuthorizationInventoryUnit`
  * Allows inventory units to be part of multiple RMAs (e.g., if an initial RMA was cancelled) while still retaining historical data
  * Migrate existing data into the new table
  * Drop the `inventory_units.return_authorization_id` column
* Start using nested attributes for adding/removing InventoryUnits to ReturnAuthorizations
  * Remove the `API::ReturnAuthorizationsController#add` endpoint (use nested attributes instead)
* Pave the way for exchanges with an `exchange_variant_id` field
* Update the admin interface for `Admin::ReturnAuthorizationsController`:
  * No longer group inventory units by variant.  This will be important for allowing per-unit data, such as for exchanges

Created by @richardnuno and @jordan-brough

Fixes #4907

Conflicts:
	api/app/controllers/spree/api/return_authorizations_controller.rb
	core/app/models/spree/return_authorization.rb
	core/spec/models/spree/return_authorization_spec.rb
Rename return_authorization_inventory_units to return_items

Shortening the name of return_authorization_inventory_units since it was becoming a nuisance.
Fixes #4920

Conflicts:
	core/app/models/spree/return_item.rb
Move old ReturnAuthorizations to LegacyReturnAuthorizations

After spending a lot of time working on migrating old return authorization data, it's become clear that doing so would be too error prone without presenting considerable risk of damaging existing data.  And/or forever incumbering future development work on Spree by requiring lots of edge cases and special considerations for legacy data.

Instead of migrating the old data, we instead renamed the existing table "return_authorizations" to "legacy_return_authorizations" and created a [spree_legacy_return_authorizations extension](https://github.com/bonobos/spree_legacy_return_authorizations).  Stores that are migrating from old versions of Spree can include that extension to continue viewing and closing-out their legacy data.  The extension does not allow creating any new legacy data.

Some of the reasons that migrating old data would be dangerous are:

- The old system used adjustments and negative payments to provide refunds, whereas the new system uses the "Refund" model.
- The old system does not provide a direct (i.e. completely reliable) link between negative adjustments and return authorizations.
  - The negative adjustment is linked to the order and has a label of "RMA Credit" but it is not linked to the ReturnAuthorization, and an order can have multiple return authorizations.
- The old system does not provide a direct link between negative payments and return authorizations.  See above bullet, plus in the old system it was very possible to create a negative payment that refunded not only the return authorization but also any other negative adjustment that happened to be pending at the time of the negative payment.
- The old system does not store tax amounts separately.  The new system will have fields dedicated to storing tax refund amounts, and trying to pull the data apart was proving very difficult and error prone, especially when you consider that tax zones may have been added/changed or tax rates changed since the time of the refund.  Leaving tax data blank for legacy data also presents unfortunate edge cases and problems.
- The old system never marked a return authorzation as refunded, and figuring that out (see above items) was error prone.  And leaving the return authorzations as non-refunded in the new system could have dangerous side effects.

All these things together made us think that we and other spree stores with legacy return data would be better served by keeping the old data as it was and providing the above extension to display and finish closing out any in-flight return authorizations.

Notes:

  - This modifies an existing migration. We're assuming no one is running off spree master and that that's OK at this point.
  - We change the "RMA" number prefix to "RA" to prevent conflicts between the old and new tables.

Created by @richardnuno and @jordan-brough

Fixes #4955
Add tax related components to return items. Fixes #4964
Always store the pre_tax_amount for the provided item

Allows access to pre_tax_amount regardless of whether the item has included tax or not.

Closes #4945

Conflicts:
	core/spec/models/spree/tax_rate_spec.rb
Introduce refund and return authorization reason.

Fixes #5003

Conflicts:
	backend/app/views/spree/admin/return_authorizations/_form.html.erb
	core/app/models/spree/return_authorization.rb
	core/spec/models/spree/return_authorization_spec.rb
Finish replacing old refund system:

- Stop requiring negative adjustments in order to perform refunds
- Add new admin pages to manage refunds
- Remove Payment#credit! (and associated controller actions) and instead use refund objects that are linked to payments
- Update Payment#cancel so that it no longer falls back to a full refund
- Refactor some code in the Refund model

Fixes #5012

Conflicts:
	api/app/controllers/spree/api/payments_controller.rb
	core/app/models/spree/payment/processing.rb
State machine for return_items.

Fixes #5041
Show flash errors for resource controller html requests

and not for js requests.
When a resource controller failed to create/update there was no indication of what had failed.

Also adds "with_model" gem to allow easier isolated testing of `Spree::Admin::ResourceController`.

Fixes #5011