move a lot of cart logic to the cart object

still more to go though
coupon admin, cart, checkout, payment form
rename coupon_discount to match the method in BSE::Cart

for improved compat between the two
avoid an uninitialized warning from BSE::UI on redirects
link to coupon management from the shop admin page
coupon code processing from cart to order final

This includes a lot of internal shop changes
fix the product list link to the order list
coupon orders report
update order detail page with coupon code and discount info
convert dates to a canonical form when processing CGI fields
use canonical key ordering for dumped json

this makes comparing old and new values simpler
add audit logging for coupon management functions
fix a nesting error in the inlinefield macro
don't use the delete action as the csrfp fallback for the delete action

and add checks to make sure we don't do it in future (the default action
shouldn't ever require csrfp)
change coupon management log levels to notice
avoid using a non-existent custom state
don't crash removing tiers from a coupon
make the order variable available on the user order detail page
used coupons are no longer deletable nor renamable

This makes incompatible changes to the orders table you need to run:

alter table orders drop coupon_code, drop coupon_code_discount_pc;

before updating the database
handle existing order payments properly