Prefs: don't determine persist? from .connected?

.connected? returns false until a connection is actually attempted. This
meant if the cache was empty, preferences would be set to their default
values and that would be persisted to cache.

This reverts commit 9ca8ef97fb9139a5aecd1f406b21a7fadfdca658.

Fixes #3785
prefs: don't cache fallback when not persisting

When persistence was disabled (for whatever reason), fallback values
were written to the cache if there was no existing value cached.

There is no benefit in doing this. Database lookups will not happen
without persistence being enabled, and there was potential for the
fallback values being incorrectly written to the cache.
Add maximum length validation for promotion description [Fixes #3837]
verify if a user can fire a following event on order or not

Fixes #3818
Reload rules select2 box after picking a PromotionRule

So that the chosen rule no longer is displayed on the select2 box, users
can associate each rule only once with the promotion

Fixes #3572
Fixes #3816
Don't convert list of stock items to an array if all we need to do is sum
Fix redirect loop with redirect_https_to_http

force_non_ssl_redirect was testing if the actions was included in
ssl_{required,allowed}_actions, but didn't consider the case that it was
empty (which should mean all actions). This caused an infinite redirect
loop on admin and checkout pages with the option enabled.

This fixes the issue and simplifies the code by combining the lists of
allowed and required ssl actions. Also added some specs.

Fixes #3813
changed to use display_price whenever possible to allow extension and to simplify code

Fixes #3822
Accept source attributes in PaymentsController to fix backend payment processing.
Add process method to BogusSimple gateway to be able to process payments.

Fixes issue where hitting "process" on payments screen breaks with
BogusSimple gateway.
[backend] Remove unnecessary top-level admin route for adjustments
Account for adjustments with nil sources in UpgradeAdjustments migration
Skip PromotionAction adjustments if originator is nil
2 Migrations to ease in the upgrade from 1.3 -> 2.0 * Assign a shipping category to existing products & shipping methods if they don't have one * Migrate old shipping calculators to the new ones and preserve their preferences

Fixes #3605
Fixes #3660
Must set calculable before saving new calculator in MigrateOldShippingCalculators migration, otherwise MySQL screams
Temporarily make originator association available in UpgradeAdjustment migration
Add FreeShipping calculator back to ease migration from earlier Spree versions
Only remove spree_credit_card fields if they exist

I encountered a situation today on a database where these fields did not already exist. Best to have some kind of catch in place to not make the migration bomb out if the fields do not exist.
Use Spree.url() to add tokens to API calls to stock_locations

On 2.0, stock_locations AJAX class are getting a 401 on http://localhost:3000/admin/stock_transfers/new since securing the stock locations API end points.

Fixes #3828
Set stock_item count_on_hand and use that in variant#in_stock? test