add osmo_use_count_to_str_c()

So far there is only osmo_use_count_name_buf(). Also provide a use count to
string using a talloc context, allowing to use OTC_SELECT.

- instead of foo_name(), rather use foo_to_str().
- osmo_use_count_name_buf() returns the buf and not the chars_needed. So add
  osmo_use_count_to_str_buf() with a signature that is usable by
  OSMO_NAME_C_IMPL().
- provide osmo_use_count_to_str_c() using OSMO_NAME_C_IMPL().

Change-Id: I1d2e7ee979f8c316ef99f7c65675b36d092ddfca
diff --git a/include/osmocom/core/use_count.h b/include/osmocom/core/use_count.h
index a019525..cc5493c 100644
--- a/include/osmocom/core/use_count.h
+++ b/include/osmocom/core/use_count.h
@@ -216,6 +216,8 @@
 			    const char *file, int line);
 
 const char *osmo_use_count_name_buf(char *buf, size_t buf_len, const struct osmo_use_count *uc);
+int osmo_use_count_to_str_buf(char *buf, size_t buf_len, const struct osmo_use_count *uc);
+char *osmo_use_count_to_str_c(void *ctx, const struct osmo_use_count *uc);
 
 int32_t osmo_use_count_total(const struct osmo_use_count *uc);
 int32_t osmo_use_count_by(const struct osmo_use_count *uc, const char *use);