[PATCH 5.15 437/667] list: introduce list_is_head() helper and re-use it in list.h