[Fixes #11734]Correct Association Basics Guide on has_and_belongs_to_many[ci skip]

Done the following changes:
 1. Replace uniq call in example with autosave as uniq is not supported
 on has_and_belongs_to_many
 2. Add :readonly option to list of supported call as per
 [EdgeApi](http://edgeapi.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many)
Merge pull request #11738 from gaurish/guides-association-basics-fix

[Fixes #11734]Correct Association Basics Guide on has_and_belongs_to_many