BUILD: tools: make resolve_sym_name() return a const

Originally it was made to return a void* because some comparisons in the
code where it was used required a lot of casts. But now we don't need
that anymore. And having it non-const breaks the build on NetBSD 9 as
reported in issue #728.

So let's switch to const and adjust debug.c to accomodate this.
diff --git a/src/tools.c b/src/tools.c
index fa92db5..39a4538 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -4426,7 +4426,7 @@
  * The symbol's base address is returned, or NULL when unresolved, in order to
  * allow the caller to match it against known ones.
  */
-void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr)
+const void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr)
 {
 	const struct {
 		const void *func;