Fixed `autosave` on associations with `inverse_of:` set on both sides of the relationship

As title suggests, when `autosave` is used in associations with `inverse_of:` set on both sides of the relationship, it throws a `SystemStackError: stack level too deep` error.

This error happens on master, 4.1, 4.0 and 3.2. Let me know if you would like me to backport it to other branches (in case the commit can't be cherry-picked) once this master version is OK'ed.

Minimum reproducable gist:

```ruby
source 'http://rubygems.org'

gem 'rails', github: 'rails/rails'
gem 'rack',  github: 'rack/rack'
gem 'arel',  github: 'rails/arel'
gem 'sqlite3'
```

```ruby
# uncomment for master
require 'bundler'
Bundler.setup(:default)

# uncomment for releases
# gem 'activerecord', '4.1.4'
# gem 'activerecord', '4.0.8'
# gem 'activerecord', '3.2.19'

require 'active_record'
require "minitest/autorun"
require 'minitest/pride'
require 'logger'

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = Logger.new(STDOUT)

ActiveRecord::Schema.define do
  create_table :users, force: true do |t|
    t.integer :super_power_id
  end
  create_table :super_powers, force: true do |t|
  end
end

class User < ActiveRecord::Base
  belongs_to :super_power, autosave: true, inverse_of: :user
end

class SuperPower < ActiveRecord::Base
  has_one :user, autosave: true, inverse_of: :super_power
end

class BugTest < MiniTest::Unit::TestCase
  def test_autosave
    super_power = SuperPower.new
    super_power.save!

    user = User.new(super_power: super_power)
    user.save!

    assert_equal true, user.save!
  end
end
```

I believe this also fixes #14030 - seems like it's the same issue, but this fix is a lot simpler.

cc @tenderlove @rafaelfranca @zzak
Not sure for exact reason, but I think `next` is discouraged, possibly due to performance issues. Consider changing this to `unless reflection.inverse_of && reflection.inverse_of.options[:autosave]` with following lines inside that block.