Turn off transactions around Spree::Order state transitions.

Add failing test showing payment processing is set in a transaction.

Mark test of subclassed order as pending.

This test is now failing but it is unclear if it was ever really
testing what it claims to be testing. An order with no email
is not valid and should not save, so the test should not pass.

Add changelog entry.

Fixes #4542
Dont show out of stock for master product

We only care about variants stock for a product with variants
Introduce PaymentMethod#reusable_sources

General method which custom gateways will probably override to make it
possible reuse payment sources

Fixes #4450
Define gemfile_path based on lib name for dummy app

Extensions developers need to make sure they add a non core lib name to
their Rakefile so that the proper path to Gemfile is generated in
boot.rb along with their dummy app.

Motivation here is help users boot their extensions using a preloader like zeus.

Fixes #4253
Make label tag for equal to radio button id

Fixes #4561
Fix issue where deleted variants do not show up in admin when requesting deleted variants

Fixes #4562
Improve code indentation. It was hard to read before.

Signed-off-by: Jaime Victoria <jaime.victoria@crowdint.com>

Fixes #4568
don't hide the shipping cost line when order is shipped
fix N+1 query performance issues on TaxRate.match method

Conflicts:
	core/app/models/spree/tax_rate.rb
[Sample] Fix ENV['LIB_NAME
']
handle empty products set on cache_key_for_products
rely on maximum return to fall back on static date

Fixes #4565
Make rspec random ordering the extension default
Drop deprecation warning for `relation.sum(&:block)`
Use ActiveSupport::JSON as Rabl json_engine

Ensure all data returned by the api is valid json

Fixes #4589
allow product rule to match 'none'

Fixes #4587
Add index to spree_orders for user_id & created_by_id

Addresses potential performance regressions discussed at #4582 in the last_incomplete_spree_order method arising after that method changed in c455e1a

Fixes #4584
Deprecates the Order#between method for created_between and completed_between

Addresses the discussion in https://github.com/spree/spree/issues/4554

Fixes #4597
provide consistent sort order for promotions

make pagination sane for promotions.
especially true for postgres which seems to do more to keep its promise that "If sorting is not chosen, the rows will be returned in an unspecified order".
since there are no indexes on this table we just use the primary key with most recent first.

Fixes #4596

Conflicts:
	backend/spec/controllers/spree/admin/promotions_controller_spec.rb
Refactor Shipments API & JS.