Made a doctest compatible with Python 2

That test might not always execute, but can be executed when the
parent test label is explicitely given.
Fixed versionchanged indentation in unit-tests.txt.
Fixed #23630 -- Made AlterModelTable rename auto-created M2M tables.

Thanks Naddiseo for the report, Andrew Godwin for guidance,
and Shai Berger for review.