Fix potenital stack level too deep with autosave or validation

When associations checked for autosave have a cycle, and
none of them is dirty, then changed_for_autosave? will be an
infinite loop. We now remember if we're in the check and
will short circuit the recursion.
Customized rails travis to repro issue