Switch to poltergeist for spree_backend.

Fixes #4383
Whitelist some params for canonical links. Fixes #4374
Implement Spree::Base as ActiveRecord::Base wrapper.

Moving inclusion of Spree::Preferences::Preferable away from an engine-base inclusion to ActiveRecord::Base, and instead making it a Spree-specific Spree::Base inclusion.  This is to prevent the Prefereble module from bleeding outward and causing conflicts in other Engines which may have attributes called 'preferred' on their models already

Fixes #4337
Fix superclass mismatch error.
Allow preferences to reference ENV variables.
Revert "Allow preferences to reference ENV variables."

This reverts commit e4a612c115ff2f03fea0943f2babde51a633cf8b.
Remove persist_cost which is replaced with update_amounts.
Display only payment method selected partial (backend)

Drop a bunch of repeated ids on html
Display cards as per gateway on backend new payments

Otherwise users could try a transaction against a gateway which won't
understand the cc profile id
Fix payments "Use new card" toggle in backend
space
Improve support for sending client encrypted credit card data

Some users might choose to encrypt cc info on client side and not record
anything related to credit card at all on db. See Adyen Client-Side Encryption
for example
Only check if payment source has_payment_profile?

Card info might come in encrypted so number won't be present and payment
source could be something other than a CreditCard object but still
support payment profiles
add missing model translation.

Fixes #4410
Update README to use latest stable version

Fixes #4406
Dont restart checkout_flow for completed orders

No need to destroy all shipments or set order back to first checkout
state. Currently shipments for completed orders are managed by
OrderInventory#veriry
Remove typecasting from Spree::Preference

* Remove typecasting from Spree::Preference

Value is always serialized (even strings) as of 2723636. Since value is
converted upon assignment, I believe it had no effect.

* Remove Spree::Preference.value_type

Now unused since typecasting on Spree::Preference removed. There is no
need to store this (values are already serialized in the correct type).

Also removes the .valid scope on Spree::Preference. All
Spree::Preferences should be valid because they have passed migrations.

* don't pass type into preference store
* remove Spree::Preference.raw_value
Refactor Preferable#preferences

Extracts finding preference names into Preferable#defined_preferences.
And searches methods for preferred_*=, as I intend to remove
.prefers_*?.
Remove unused preference methods

This removes several methods which were never used.

* remove prefers_color?, prefers_color=
* remove prefers(:color)
* remove preferred(:color)
* remove preference_description(:color)
* remove preferred_color_description
* remove remove_preference
Allow preference default to be defined as a proc

This gives Preferences::Store#get the same semantics as Hash#get. That
is, in the event of a miss (the preference is not yet defined), a block
will be yielded to and its result returned.