Fix type annotations in pandas.core.indexes.datetimes
- [x] closes #26366 
- [x] tests passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

`pandas/core/indexes/timedeltas.py` taken care of as well since the errors were the same.