CLN: Index.append() refactoring
 - [x] tests passed (one xpassed due to #16234)
 - [x] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``

The first commit is just #16213 .

The others reorganize a bit the code for ``Index.append()``.