BUG: Make :func:'read_pickle' and :func:'to_pickle' accept FilePathOrBuffer
- [ ] closes #30297
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
