[MEDIUM] moved stats and buffer generic functions to new files

Neither the primitives used to write data to a buffer, nor the stats
dump functions are HTTP-specific anymore. Move them to dedicated
files
8 files changed