BUG: df.sparse.to_coo() raising on duplicate colnames
- [x] closes #29564
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry

Added an ASV since frame case wasn't previously covered, no change thanks @mzeitlin11 