ENH/CLN: Add factorize to IndexOpsMixin
As pointed in #7041, I prepared a PR to add `factorize` to `IndexOpsMixin`.

As a side benefit, `Multiindex.from_arrays` can preserve original `DatetimeIndex.freq` and `tz`. (Related to #3950 and #6606.  These issues are not solved yet because these use different methods to create `MultiIndex`). 

I would like to confirm following points before adding more tests.
- What `Index.factorize` and `Series.factorize` should return as unique values, `ndarray` or `Index`? I think it should return `Index` to preserve `DatetimeIndex` attributes (`freq` and `tz`).
- Is this should be added to `api.rst`? 

this seems reasonable; factorize for a `Index/Series` should return an `Index` (of course using it on an ndarray just returns an ndarray). So the api is preservered. You can add it to the `api.rst` for completeness.
 rebase 1 more time (I think just rlease notes conflict then good to go)
 @sinhrks thanks!
 @jreback Thanks to merge. Added more tests and added descriptions to `api.rst`
