cli: replace macro with sizeof()

Using sizeof() to get buffer lengths instead of a #define makes for
nicer code.
configure.ac: add dirty to dirty versions

Since commit 6a01a0d, "Move to autotools", the version number has been
set by "git describe --always". Add "--dirty" so dirty working
directories don't look like clean commits.
player: fix error in comment

A comment had a grammatical issue which made it a bit misleading.
Clarify.
replace mprintf() with printf()

Previously, there has been several threads competing over writing to
stdout for debugging purposes. It was very convenient to have a printf()
which guaranteed line integrity, which was mprintf().

Such printouts have been phased out over time, and there is now no point
in having such a function in the code anymore.

Remove the function and replace all calls to mprintf() with calls to
printf().
block all signals in all threads

Even though yastg is a multithreaded application, no attention has been
payed to signals so far. As signals are delivered to a random thread,
it makes sense to block signals in all but one thread.

Start this work by blocking all signals in all threads.
break out console into a separate thread

This is necessary before the main thread can handle signals.
wait for signals in main and quit on sigterm

The main thread in main.c now handles all signals and we should be
signal-safe.
console: same function prototype for all cli calls

All cli functions now have the same prototype, this was possible thanks
to breaking out console into a separate struct.
buffer: add

console, connection and server uses about the same code for printing to
and reading from buffers. Generalize their code and put them in a new
file buffer.c.
server: use buffer for receiving peer data

The new and generalized buffer routines can be used in server to
simplify the buffer handling there when receiving data from peers.
connection: use buffer for sending peer data

The new and generalized buffer routines can be used in connection to
simplify the buffer handling there when sending data to peers.
console: use buffer

The new and generalized buffer routines can be used in the console to
simplify the buffer handling there when handling console input/output.