Fix price parsing for localized prices

The existing code for parsing prices (see https://github.com/spree/spree/blob/master/core/app/models/spree/variant.rb#L55-66)
doesn't take into account entries for prices that use a different decimal separator than the full
stop ("."). This is true for almost all European and Latin American locales.

Example:
US: 15.99 = 15 dollars and 99 cents
Other: 15,99 = 15 dollars and 99 cents

If the product/variant edit form shows 15,99 (correct, because it uses `number_to_currency`) and
one presses save, the code linked above throws away the comma and saves it as 1599 and it gets
shown as 1.599,00 when the form is re-rendered (the full stop is the thousands delimiter here).
When one saves again, it gets saved as 1.60 (actually 1.599 but of course rounded).

This commit fixes the issues by taking into account locale settings for the decimal separator and
the thousand delimiter and replacing characters accordingly.

Fixes #1885

Conflicts:

	core/app/models/spree/variant.rb
Must reset locale back to default locale after tests
Translate order cancel + confirmation emails, as well as shipped item email

Merges #1884

Conflicts:

	core/app/views/spree/order_mailer/cancel_email.text.erb
	core/app/views/spree/order_mailer/confirm_email.text.erb
	core/spec/mailers/shipment_mailer_spec.rb
Prevent commerce_tracking flash message appearing on checkout

Fixes #1428 (again)

Also stops a double iteration through all (max two) of the flash messages
Reset locale in shipment_mailer_spec
Reset the I18n.locale after order_mailer_spec
Add "encoding: utf-8" magic comment to *.js.erb

Conflicts:

	core/app/assets/javascripts/admin/admin.js.erb
	core/app/assets/javascripts/admin/product_autocomplete.js.erb
Include analytics helper into layout specified with Spree::Config[:layout]

Fixes #1887

Also set unauthorized to use defined layout

Conflicts:

	core/lib/spree/core/controller_helpers.rb
Fix typo in checkouts/edit.js
Check for existence of variant_images in _thumbnails partial
Target correct form class name in checkout.js

Fixes #1905
Freeze to kaminari 0.13.0 until amatsuda/kaminari#280 is fixed
Strip trailing slash for dash analytics header override
Fix postgres orphaned preferences SQL

Quoting fields/reserved keywords with backticks is only allowed in MySQL,
while single quotes are supported by both databases.

Fixes #1904
Upcase SQL syntax
Fix missing sass-rails dev dependency for extension gemspec

Fixes #1874
defect fix checkout address state not displaying

Merges #1947

Fixes #1937
Remove commented out pending line from preferable_spec.rb
if preference is not found, fallback to DB before falling back to default

Fixes #1500
Check if preferences table exists before falling back to DB.

Fixes this broken build: http://travis-ci.org/#!/spree/spree/jobs/2435037