patch 8.2.0500: using the same loop in many places

Problem:    Using the same loop in many places.
Solution:   Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
diff --git a/src/insexpand.c b/src/insexpand.c
index 0b2435f..259acb9 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2331,7 +2331,7 @@
 
     // Go through the List with matches and add each of them.
     range_list_materialize(list);
-    for (li = list->lv_first; li != NULL; li = li->li_next)
+    FOR_ALL_LIST_ITEMS(list, li)
     {
 	if (ins_compl_add_tv(&li->li_tv, dir) == OK)
 	    // if dir was BACKWARD then honor it just once
@@ -2513,7 +2513,7 @@
     {
 	what_flag = 0;
 	range_list_materialize(what_list);
-	for (item = what_list->lv_first; item != NULL; item = item->li_next)
+	FOR_ALL_LIST_ITEMS(what_list, item)
 	{
 	    char_u *what = tv_get_string(&item->li_tv);