Refactor out methods to product class that control if a product is on sale or on display.

Fixes #2167
Adding promotion usage information to the admin

Fixes #2193

Conflicts:

	promo/app/views/spree/admin/promotions/_form.html.erb
Centralizing coupon code application + customer messaging logic
More specs for coupon messages. Changes to make specs pass.
Improved case insensitive coupon codes

Fixes #2176
update totals before checking if payment is required

Fixes #2191
stub has_available_shipment calls in tests

This method is caused unwanted side-effects

Related to #2191
Break order_spec for #2191

This is so we can easily reproduce this error and fix it later on
Small refactor of options method in Gateway model.

Fixes #2194
Various API improvements.

* Merge search/index actions of API's OrderController
* Add searching ability to API's CountriesController
* Allow pages and per_page parameters to be passed to Countries
* Add count node to payments index action
* Allow pages and per_page parameters to be passed to Payments
* Add searching ability to API's PaymentsController
* Allow pages and per_page parameters to be passed to ProductProperties
* Add searching ability to API's ProductPropertiesController
* Merge search/index actions of API's ProductsController
* Allow per_page parameter to be passed to Products
* Add search and allow per_page parameter to be passed to ReturnAuthorizations
* Allow pages and per_page parameters to be passed to Taxonomies
* Add searching ability to API's TaxonomiesController
* Add search and allow per_page parameter to be passed to Variants
* Allow pages and per_page parameter to be passed to API's Zones
* Add searching ability to API's ZonesController

Closes #2198
Require secure connection on OrderController#show

Fixes #2164
Move fire_event and default_notification_payload methods out from Spree::StoreController and into ControllerHelpers::Common

This is because spree_auth_devise requires them for its registrations controller
Remove display_on option for payment methods

Fixes #1981
Add a before transition callbacks to Order model

These are callbacks that are called *before* a typical state transfer through next.

Fixes #2191.
Remove argument to PaymentMethod.available within Order#available_payment_methods

Related to fix for #1981
Revert "Add a before transition callbacks to Order model"

This reverts commit 02e3e6c9c7c8c9599f6612497c94c1afb14cbe1c.

This commit only belongs on fix-2191 (for now)
Adding Order#variants

Convenience method for grabbing a list of variants

Fixes #2195
Don't include 'out of stock' error message in shipment mailers

If a product is being shipped, let's assume that it's *in*-stock

Fixes #2196
Remove now-useless (as a result of #1981) payment_method_spec
Don't pass argument to PaymentMethod.available within Admin::PaymentsController

Related to #1981