patch 9.1.0851: too many strlen() calls in getchar.c

Problem:  too many strlen() calls in getchar.c
Solution: refactor code and reduce strlen() calls
          (John Marriott)

closes: #16017

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/structs.h b/src/structs.h
index 66d57e0..19768e6 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -573,6 +573,7 @@
 struct buffblock
 {
     buffblock_T	*b_next;	// pointer to next buffblock
+    size_t	b_strlen;	// length of b_str, excluding the NUL
     char_u	b_str[1];	// contents (actually longer)
 };
 
@@ -585,6 +586,7 @@
     buffblock_T	*bh_curr;	// buffblock for appending
     int		bh_index;	// index for reading
     int		bh_space;	// space in bh_curr for appending
+    int		bh_create_newblock;	// create a new block?
 };
 
 typedef struct