Fix _alter_many_to_many to not rename the table to itself

Fixes #22293.

https://code.djangoproject.com/ticket/22293