Add and use cgit_find_stats_periodname() in print_repo()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
diff --git a/ui-stats.h b/ui-stats.h
index 4f13dba..f0761ba 100644
--- a/ui-stats.h
+++ b/ui-stats.h
@@ -21,6 +21,7 @@
 };
 
 extern int cgit_find_stats_period(const char *expr, struct cgit_period **period);
+extern const char *cgit_find_stats_periodname(int idx);
 
 extern void cgit_show_stats(struct cgit_context *ctx);