ENH: Add optional argument keep_index to dataframe melt method (merged master onto old PR)
This PR merges master onto @NiklasKeck's PR branch (#17440) to add an optional argument to keep_index to `pd.melt`. There is quite a bit of discussion between the following 2 PRs and issues:

Index gets lost when DataFrame melt method is used #17440
ENH: Add optional argument keep_index to dataframe melt method #17459
Melt enhance #17677

Please let me know if additional things need to be done to complete this PR

----

Setting keep_index to True will reuse the original DataFrame index +
names of melted columns as additional level. closes issue #17440

(cherry picked from commit 0c64bf0e5f145781c0f74fb93ffcd63a6d964bd9)

- [x] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
