MNT: migrate from codecs.open to open
c.f. #61950, towards supporting Python 3.14

See [the 3.14 deprecations](https://docs.python.org/3.14/whatsnew/3.14.html#deprecated) and https://github.com/python/cpython/issues/133036 for more details.

There is one spot that was nontrivial - the use in `pandas.util._print_versions` I think was buggy - it wanted to write a file in bytes mode and also specified an encoding. `codecs.open` didn't blink at this but regular `open` is more restrictive. I think what I updated it to is correct and this is a latent bug, probably introduced a long time ago in the 2->3 transition.

- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Thanks @ngoldbaum 