Add test case for autosave association with nested attributes.

This test case covers the behavior described by #8194.

When saving the parent and its nested attributes are invalid, they should not be persisted, neither the parent.