patch 9.1.0843: too many strlen() calls in undo.c

Problem:  too many strlen() calls in undo.c
Solution: refactor code and remove strlen() calls, update test_undo.vim
          and close remaining open swap files (John Marriott)

closes: #15995

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/version.c b/src/version.c
index 7d02e6c..7e95a46 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    843,
+/**/
     842,
 /**/
     841,