ENH: Allow comment lines to be written to CSV outputs. Complements read_csv's comment param
- [ ] [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.

---
There are many use cases (especially in the scientific community) where the best/only course of action is to enable to embedding of configuration parameters and/or other metadata into the beginning of a CSV file itself. These are typically prefaced with some comment-indication prefix such as `#`. This maintains human readability while attaching the metadata to the generated file itself.

Pandas' `read_csv` method already implements a feature to read such files and ignore these lines when parsing the the data into a dataframe. This PR implements the complement of this feature. It allows users to write these metadata and/or comment lines in their CSV outputs as well.

The `to_csv` method was extended to allow a `comment` param matching that in `read_csv` along with a `comment_lines` param which takes an iterator of strings, each of which will be written to the beginning of the file as a single line, prior to and CSV header or body data being written.
Thank you @canthonyscott for your PR. When proposing a new feature, it is typically better to first open an issue before implementing it to get feedback on the idea.

`to_csv` supports file handles, so a user could "easily" (but probably less convenient) have their own wrapper:
```py
with open("test.csv", mode="wt") as handle:
    handle.write(comments)
    dataframe.to_csv(handle)
```

 That makes total sense. I can go open one. I may have been a little over-eager to try and see if what I wanted to do was an actual possibility first. Thank you! Closing this PR as discussion in the issue has led to a better solution