Don't touch stock items when order is not completed

Fixes #3324
Fixes #3334
Remove pending specs in OrderInventory
Apply coupon before payments are created and processed

Payments can't be created before a promotion discount is applied,
otherwise we get inconsistent values between payment amount and order
totals

Fixes #3351
Display right price when product has variants

When a user loads the product page it was not displaying the price of
the variant chosen on the form

Fixes #3384
Fix issue where 'deleting' a product would cause admin products listing to error out

Fixes #3385
Fix RSpec deprecation warning with should_not raise_error(SpecificErrorMessage)

DEPRECATION: expect { }.not_to raise_error(SpecificErrorClass) is deprecated. Use  instead.
Clean up most rspec deprecation warnings

Too much noise when running api and core build

Fixes #3376
avoid hard-coding path of orders, stock locations + variants APIs

Fixes #3371
Fixes #3372
[api] Remove excessive do/end block from variants resources definition
Click "Update" button on order details page, not "Continue"
Use spree_login_path instead of spree.login_path

When redirecting users for authentication, `spree.login_path` doesn't
work properly when a `login` named route is defined outside the spree
core engine scope. Besides it keeps compatibility with what it's defined
in lib/spree/authentication_helpers.rb
Only create assets if component is included (on install)

In cases users are only running a backend application, for example,
there's no need to add frontend assets as it would only break user
application

Fixes #3368
Require 'mail' gem in Spree::Core

Fixes #3342
Remove setting of ActiveRecord::Base.include_root_in_json

See this conversation: https://groups.google.com/forum/#!topic/spree-user/D9dZQayC4zs
[api] Remove before_address from CheckoutsController

This was causing an issue where an order couldn't be updated once it was in the 'address' state because address details had not been provided. If these records aren't even built, then an update will succeed just fine.
[api] Remove test checking for now-impossible (see last commit) situation in CheckoutsController
Fix sample order generator to make the new orders show up as complete
Removes default_per_page method which does not work to upgrade Kaminari.
Make 'Card has expired' error message translateable
Add spree/credit_card.base translation

This is necessary due it to being used in API responses when the payment step fails in CheckoutsController