Fixed #23614 -- Changed the way the migration autodetector orders unique/index_together

Thanks to Naddiseo for the report and Tim Graham for the review