fix for a bunch of bugs in support for updating a belongs to association from the foreign key

Hi.

See
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1178-patch-re-implemented-support-for-updating-a-belongs-to-association-from-the-foreign-key

I forgot to submit one more bugfix. But today when preparing it for
submission I realized that this feature has a bunch of bugs. The
proposed patch has a pack of new tests and new implementation of this
feature.

If this looks too risky just before RC, then I suggest to drop this
feature completely.