#6026 - Introduction of Sort Code 'locale' for BACS

In the admin, it will use the store’s base country to determine the
term for ‘Sort Code’.

In the front-end, it will use the customer’s billing country to
determine the term for ‘Sort Code’.

In all cases, if a locale does not have a sortcode label set, it will
use ‘Sort Code’.

**Locales have been added for:**
* AU
* CA
* IE
* IN
* IT
* NZ
* SE
* US
* GB
* ZA

But may need adjusting based on user feedback.
Fix whitespace
Move locale to new method in BACS gateway
Removed 'apply before tax' options for coupons - this should be the default core behaviour
Remove 'order' discounts from classes
Store discount 'tax' to show discounts on prices including tax more accuratly

Also deprecated some functions named after having 2 levels of discounts.
Introduce email settings action hooks
Correct hook name: `woocommerce_email_settings_before`
Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty).

Closes #5998
Remove locales with 'Sort Code'

Wrong swamp
Merge pull request #6814 from bryceadams/patch-6026

#6026 - Introduction of Sort Code 'locale' for BACS
re-run stupid table on save
Typo itme -> item
Merge pull request #6844 from SiR-DanieL/patch-2

Typo itme -> item
product by sku
improve get_rating_count() for rating-less reviews

Should close #6839.

According to `woocommerce_enable_review_rating` &
`woocommerce_review_rating_required`, it will do a different DB query,
so that when reviews without ratings are allowed, it will do a query
that counts those comments as reviews.
Adjust total for partially refunded order totals

Closes #6666
Added 'top freebies' to product report.

Closes #5596
Merge pull request #6837 from ragulka/email-settings-action-hooks

Introduce email settings action hooks
Merge pull request #6847 from harrisonde/sku

Look up product by sku