TST/CoW: copy-on-write tests for df.head and df.tail
- [x] [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
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Progress towards #49473
Because `.head()` and `.tail()` use `.iloc` under the hood, copy-on-write is already implemented for them, but this PR adds explicit tests for both methods.
Thanks @seljaks 