Fix regression in early output to stdout

Output to stdout normally goes to file descriptor 1. However, during
early boot, before the console is opened on file descriptor 1, we also
want printf() to work. So this case is specially treated in
libc/stdio/__stdout_write.cc, where in this early case, we used debug_write
directly, instead of write to the file descriptor.

However, recent patches changed debug_write to write to a memory buffer,
instead of to screen (unless "--verbose" option is given to the loader).
This made early printf() break too.

This patch changes __stdout_write to use console::write(), not
debug_write(). To use console::write(), I had to convert that source
file to C++.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader.cc: make error messages visible

Since recently, debug() messages are by default not visible. This means
they are not a good way to print error messages :-)

This patch fixes two error messages from loader.cc, that were no longer
visible. For example, "scripts/run.py -e xyz" completed without any message
instead of telling the user that "xyz" doesn't exist.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader: Bring back OSv version at boot

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>