Dont send a HTTP POST when removing non-persisted nested fields

Fixes #3204
Check promotion eligilbity before performing CreateLineItems promo action

See coresponding 1-2-stable fix in pull request 3147.

Fixes #3219
Wrap permalink saving in a with_lock block to lock the table during updating

In addition, only select the permalink field from the table when querying all similarly-prefixed permalinks

This should prevent duplicate permalinks being generated by different processes hitting the database at the same time.

Fixes #2714

Conflicts:
	core/lib/spree/core/permalinks.rb
Improve comment for Order#has_unprocessed_payments?

Fixes #3226
jQuery Validate IE9 event handle fix
Reload shipments during Order#finalize to prevent possible attempts to call update_column on objects representing records that no longer exist

Code to repo:

bundle exec rails c

require 'ffaker'
require 'spree/core/testing_support/factories'
order_number = R583837274
shipping_method = FactoryGirl.create(:shipping_method)
payment_method = FactoryGirl.create(:payment_method, :display_on => front_end)
order = FactoryGirl.create(:order, :number => order_number)
order.shipping_method = shipping_method
order.state
order.next
order.state
order.next
order.state

Stacktrace is this:

ActiveRecord::ActiveRecordError: can not update on a new record object
  from /Users/ryanbigg/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/persistence.rb:195:in `update_column'
  from /Users/ryanbigg/Projects/gems/spree/core/app/models/spree/shipment.rb:105:in `update!'
  from /Users/ryanbigg/Projects/gems/spree/core/app/models/spree/order.rb:392:in `block in finalize!'
  from /Users/ryanbigg/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `each'
  from /Users/ryanbigg/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
  from /Users/ryanbigg/Projects/gems/spree/core/app/models/spree/order.rb:392:in `finalize!'
Add inventory units for order, now necessary when testing create_shipment method
Newer jQuery.attr returns undefined, handle gracefully

Fixes #3236
replace ids/names for select boxes as well

Fixes #3236