Fixes #4905: Error while trying to set "weight" in Variant with "," as seperator.

Fixes #4905
Fixes #4939
Refactor number parsing to be DRY. Fixes #4939

Conflicts:
	core/lib/spree/core.rb
	core/spec/models/spree/variant_spec.rb
	core/spec/spec_helper.rb