Reversion of the rule commits

Revert "PromotionHandler::Cart scope only promotions with rules"

This reverts commit 7d4457f90a3ec94a5e53bf62fbc80d2bce49c650.

Revert "Include coupon code promotion rule partial in backend"

This reverts commit 09eda47b66c66801470684902ed03b3d296499df.

Revert "Dont validate code presence if rule is a new record"

This reverts commit b1b74fadd3ba27c6821b2a14a8627143355f9386.

Revert "Remove both code and timeframe fields in promo form"

This reverts commit 2a061822dd70306930317ef5586bfd79a7d55582.
Remove CouponCode rule

It's better off jsut using a simple field for this rather than having a whole other level of indirection
Fix coupon application to return a useful error if coupon is already applied
Do not activate promotions with codes in PromotionHandler::Cart
Ensure coupon code discounts are shown on the cart page
FlatPercentItemTotal now calculates on a per-line-item basis
Support the following promotion situations:

* Successful application of a coupon code
* Coupon code has expired
* Coupon code is not eligible for this order
* Coupon code has reached its maximum usage amount
* Coupon code could not be found

Removed support for 'better coupon already applied' because of:

* People should be able to use their eyes and determine for themselves and, more importantly:
* This is really really really really really really really really really really hard to determine when we're now applying adjustments to multiple line items within the order, rather than the order as a whole.
[frontend] Clean up tests in OrdersController's spec
Remove regression test checking for a shipment adjustment

Shipment adjustments are no longer created. The 'adjustment' is now a 'cost' field on the shipment
Return adjustments with line items
[api] Add ability to apply coupon codes from the API

This will be used in frontend's checkout when the user hits 'submit' on the payment step. Once the user clicks the button, they'll see 'applying coupon code' while there's a synchronous background request that is attempting to apply this code. If the application is succesful, the coupon_code field will be cleared and the form will be submitted as normal. If it is unsuccessful, we will show them an error message.

The benefit of this change is two fold: 1) applying a promotional code is computationally difficult and may cause the payment to take longer than the user has patience for and 2) that you won't lose the payment information if the coupon code is invalid. The latter being the bigger win here, imo.
Correct flat_percent_item_total_spec to use a line item rather than a order
Ensure coupon codes for whole-order adjustments work correctly
Define PromotionHandler::Coupon#successful? to return boolean of success of application
Cache result of insufficient_stock_lines so that it is not called for every single line item rendered on the cart page
Pass through order in CreateItemAdjustments#create_adjustment call

This is so the order isn't reloaded every time adjustable.order is called, as before
Apply coupon codes using API endpoint

When someone enters a coupon code, we should not be clearing out their payment data. This is really inconvinient for them. They got that all right and then stuffed up the coupon code. So instead we now apply it in the background. If the application is successful then we go through as normal. If it's unsuccessful, they're told as such and given an opportunity to try a new coupon code if they wish, or carry on without one
Once a coupon has been applied to the order, ensure totals are updated
Add an assurance that coupon code adjustments actually modify an order's total
Arrange order totals on order_details in a sensible fashion