ENH: Add `replace` method to `Index` 
- [X] closes #19495
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
- [x] docstring for the new Index.replace() method
- [X] won't do: type hints
- [ ] merge with `ENH:` commit message

Added a replace method to Index classes, as well as tests.