Convert do_printstat to a template function

* printstat.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Include "printstat.h".
(do_printstat): Move to printstat.h, parametrize its name
and struct stat.
diff --git a/Makefile.am b/Makefile.am
index 5a852b8..bc7dc89 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,6 +64,7 @@
 	personality.c	\
 	prctl.c		\
 	printmode.c	\
+	printstat.h	\
 	process.c	\
 	process_vm.c	\
 	ptp.c		\