fix inverse_of association in block of new child

This fixes inconsistency when building children of association
which has inverse_of set properly.

When creating new association object with a block:

    parent.association.build do |child|
      child.parent.equal?(parent) # false
    end

So the block the `child.parent` did not point to the same object.
But when the object is created it points to same instance:

    child = parent.association.build
    child.parent.equal?(parent) # true
Merge pull request #9996 from mikz/master

Association with inverse_of does not set the parent in association building block