Disassociate inventory units when a ReturnAuthorization is destroyed

Avoid leaving the inventory units in a bad state.

Fixes #4935
Undo change to current_example.
Revert "Use prepend_before_filter to try calling before apply_coupon_code. refs #4926"

This reverts commit 4c2f3618358feb5f1a160f1522580ee02a52eb24.
Change price * quantity to amount.

This is defined within line_item. It simplifies the code a little bit,
plus now it has API compatibility with orders. This should hopefully
allow us to remove some of the 3 percent off calculators that do almost
exactly the same thing...

Re-factor flat_percent_item_total.

The data here is now always a BigDecimal.

- The preference returned is a BigDecimal so it doesn't need to be
  converted to a string, and then back to BigDecimal
- Big Decimal provides round, so we don't need to convert to a float,
  round and then go back.

Extract quantity to it's own function.

Quantity is used by some of the calculators, and this will maintain
compatibility between calculators for use on both LineItems and Orders.

It also simplifies some of the code!

Add calcuators to LineItem adjustments.

With some minor modifications these calculators now work with line items
as well as whole orders.  This will allow store owners to set up
discounts of a specified amount on a product or set of products, rather
than only percentage discounts.

Fixes #5007

Conflicts:
	core/spec/models/spree/order_spec.rb
Improvements to API performance.

Refactor BaseController#product_scope to allow subclasses
to override the associations that are eager-loaded from a product.
In doing so, removed two associations that were eager-loaded
but never referenced (product.properties, variant.prices).

In Product#total_on_hand, don't load and instantiate all the
variants if all we need to know is whether any of them
track inventory. And don't load all the stock_items to sum their
counts on hand.  (Fix to 368b89786).

Fixes #5008
More code coverage.
Reduce the number of cascading touches.

For better performance when saving a product with many variants,
don't call `touch` when not necessary.

* After saving a product, but neither the product nor its
  default price changed, don't touch it.
* After saving a stock item, only touch the variants if the stock
  item changed.

Background: in ActiveRecord, if a product has not changed,
product.save will not write to the DB--but it *will* fire
the `after_save` callback. In that case there is no need to
touch anything.

Also factored out a method in variant.rb.

Fixes #5009
Fix simple_current_order to not conflict with order.
Fixes #4611