[ci skip] Fix number of methods added by association.

Also clean up some trailing spaces on line 1143-1146.
Merge pull request #12564 from JuanitoFatas/association-basics

[ci skip] Fix number of methods added by association.
Make define_non_cyclic_method simpler
Fix some indentation on autosave association