[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.