[MEDIUM] implement the statistics output on a unix socket

A unix socket can now access the statistics. It currently only
recognizes the "show stat\n" command at the beginning of the
input, then returns the statistics in CSV format.
3 files changed