BUG: pct_change wrong result when there are duplicated indices
- [x] closes  #30463
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

@jbrockmendel can you give the tests a quick once over. LGTM