Fix boot-time stdout support

We only open file descriptor 1 relatively late in our boot process (see
vfs_init() in fs/vfs/main.cc). We would like to be able to use stdout
(and C++'s std::cout) much earlier than that - examples include ACPI's
information messages (before c9dadf2d351e8893f004648180bc10cda1d4852b)
and our "--help" command line parameter.

Before this patch, early writes to stdout almost work, but with a strange
twist: They only write the string up to the last newline, and whatever is
left is buffered until much later - when all those "string ends" are lumped
together.

The basis of Musl's stdio write mechanism is the "f->write()" method.
It needs to write *two* things: Whatever we have buffered previously,
and the new string given to it. __stdio_write() is the default
implementation, which does this correctly using writev(). But our
early implementation, __stdout_write only write the new string, and
the buffered part remained buffered, collecting various string parts
until it was finally flushed when we switched to the correct __stdio_write.

This patch fixes __stdout_write(), to write both strings as expected.

Fixes #104.

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