[MEDIUM] buffers: add BF_EMPTY and BF_FULL to remove dependency on req/rep->l

It is not always convenient to run checks on req->l in functions to
check if a buffer is empty or full. Now the stream_sock functions
set flags BF_EMPTY and BF_FULL according to the buffer contents. Of
course, functions which touch the buffer contents adjust the flags
too.
8 files changed