libfdt: Factor out string search function

This patch pulls out the logic for finding a string in the string table
into _fdt_find_string(), from fdt_sw.c's find_add_string().  This function
will be useful for random-access read-write functions.  In the process
clean up the search logic a little.
diff --git a/libfdt_internal.h b/libfdt_internal.h
index 91361c2..96f5fa8 100644
--- a/libfdt_internal.h
+++ b/libfdt_internal.h
@@ -30,7 +30,7 @@
 uint32_t _fdt_next_tag(const struct fdt_header *fdt, int startoffset, int *nextoffset);
 struct fdt_property *_fdt_getprop(const struct fdt_header *fdt, int nodeoffset,
 				  const char *name, int *lenp);
-
+const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
 
 #define OFFSET_ERROR(code)	-(code)
 #define PTR_ERROR(code)		(void *)(-(code))