Need to set a code in the store sample.
Remove unused cached_default method.
Refactored API VariantsController scope.

The Spree::API::VariantsController commits a few crimes:

1. Using .active in an attempt to get non-deleted variants, when active
has nothing to do with active, and instead determines if the Variant has
a price in the current currency.

2. Uses || for a permission check instead of &&

3. Explicitly tests a users role rather than testing permissions

4. Uses unless/else

5. Duplicates code

This refactored code should be easier to read, and more correct.

Fixes #4519
Drop windows.location.reload when editing tracking number
Fix issue where payments can get their credit cards disassociated from them.

This was initially discovered when integrating with the paper_trail gem, which
calls dup in an after_update to try to capture the changed state of the
object, however, this could happen elsewhere and it is good to be
defensive here.

Fixes #4512
Pass source attributes to force validation on spec
Fix order_details_spec when edit tracking
check show deleted when searching for deleted products
default show deleted to fault and carry it's state over

Fixes #4509
Account for 1.3 upgrade when warning about migrations

Fixes #4518
Sample should only create Store if none exists yet

There's a migration which already create a store record. Creating it
again on the samples breaks the spree install due to validation on
Store#code uniqueness
Remove unused spree_backend.js file leftover from asset migration.
Remove unused spree_backend.css file leftover from asset migration.
Add spree to extension gemfile to make frontend/backend available.
Fixes #4527
remove selenium gem and selenium conditionals, running on poltergeist perfectly now
Touch resources when updating positions
fix collection cache key with total models count
remove assign_stock_changes_to

Nobody likes this function. It showed up to a party once and everyone
else left. Its parents are ashamed of it. It listens to bad music.
Removing it is doing the whole class a favor.

Fixes #4532
[api] Support order routes on /api/checkouts as well as /api/orders

I got sick of not knowing if /api/checkouts was the right prefix to use, or if I should use /api/orders. If I get sick of it after one day of usage, then I'd suspect other people who are using the API would also be sick of it.

Let's fix this problem and there will be no more getting sick of it :)
[api] Allow for accessing states inside of countries in the API

Strangely, StatesController already supported this but there wasn't a route defined for that. I only found this out today when I tried making a request to /api/countries/:country_id/states (with my spree_api_examples project) and had that fail.