fix for a bunch of bugs in 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

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