test-pipe.cc: make it run on Linux as well

Most tests should be able to run on both Linux and OSv - so we can ensure
the behavior we're testing for is actually the correct Linux behavior.

This patch modifies test-pipe.cc to also compile and succeed under Linux.
This required changing OSv specific constructs (sched::thread, debug())
to standard ones (std::thread, std::cout), fixing a few bugs in the test
itself which weren't noticed in OSv, ignoring SIGPIPE (as we do in OSv),
and changing the test not to assume the pipe size is exactly 8K (in
Linux, it happens to be 64K).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>