BUG/ENH: Improve categorical construction when using the iterator in StataReader
- [X] closes #31544
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

thanks @bashtage 