Fixed #1995 Added discount support for PayPal Standard subscriptions

Discounts on subscriptions are not straightforward since it is unclear whether to add the discount to the ongoing subscription price, or the introductory trial offer only. By default, Shopp will apply the discount to the ongoing subscription price. Filtering the shopp_paypalstandard_discount_trials to return boolean true will apply the discounts to the trial price instead.
Fixed #2892 Implemented ShoppDBInterface

Refactored all of the mysql_* calls to load the appropriate ShoppDBInterface engine class (for mysqli extension or the original mysql extension).

This should correct both #2892 and #2843
Merge branch '1.3.x'
Fix for #2900

The original if statement would add the scrollable area incorrectly.
Fixed connection detection to not require WP 3.9
Fixed #2897 Normalized directory separators for URL mapping
Merge branch 'master' into iss2900
Fixed #2900 Added agreement option to defaults and cleaned up code to standards
Fix for #2900

The original if statement would add the scrollable area incorrectly.
Fixed #2900 Added agreement option to defaults and cleaned up code to standards
Fixed #2894 Corrected entity conversion for plain text customer registration emails
Fixed #2888 Calculate total items sold (quantity) through sub-query

The table join for purchased line items caused cartesian product of order rows and purchased line item rows. For every line-item result, the order result columns would be duplicated and then factored into the aggregation functions of the query.
Merge branch '1.3.x'
Fixed #2885 Unapply free shipping discounts properly
Merge branch '1.3.x'
Fixed an issue where a removed item tied to a discount can cause a fatal error
Fixed new Cart API tags

Two of the new functions were not in the register, and has_savings
wasn’t properly returning true (in 1.3, $item->sale = “1” not “on”).
Merge pull request #2904 from ingenesis/cart-api-fixes

Cart API fixes
Merge remote-tracking branch 'upstream/master'