Handle unsortable Periods correctly in set_index, MultiIndex
3rd of 3 to address bugs in #17112

`set_index` goes through MultiIndex.from_arrays, which calls `factorize_from_iterables`... which tries to sort the inputs.  In cases like `Period`, sometimes the inputs can't be sorted.  But for the purposes of `set_index`, we don't actually _care_ about the order.  So we impose a reasonable fallback.

New tests are likely not in the correct place.  Pls advise.
Will revisit this later. Closing.