ENH: add return_inverse to duplicated for DataFrame/Series/Index/MultiIndex
Closes #21357 

I followed the recommendation of @jreback there to change `duplicated`, and to make the output a tuple if `return_inverse=True`.

I didn't find a test for the behavior of `DataFrame.duplicated()` -- there's a test of `Index.duplicated()` and `Series.duplicated()` in `tests/test_base.py`, but nothing I could find in `tests/frame/`.

So I added a file to test to test current behavior, as well as the new kwarg. Notably, the backend between the different Series in the output tuple is different (`pandas._libs.hashtable.duplicated_int64` vs. `np.unique`), and so I also added several tests that these results are exactly compatible.