create_join_table uses same logic as HABTM reflections

Before this change, create_join_table would not remove the common prefix
in the join table name, unlike ActiveRecord::Reflections. A HABTM
between Music::Artist and Music::Record would use a table
music_artists_records, while create_join table would create
music_artists_music_records.
Merge pull request #16219 from skanev/fix-create-join-table-with-common-prefix

Make create_join_table use the same logic as HABTM reflections