Clean up printf_core() and make it obey the standard
The original implementation made an effort to count Unicode code points
rather than bytes (which is what standard printf() is defined as).
This makes printf() work incorrectly in some circumstances, especially
where its limits and return values are used to ensure memory is correctly
sized for the output.
I don't expect this change to break any HelenOS code, except potentially
for cosmetic issues where its used for aligning output on monospace display,
which in itself cannot possibly ever handle that scenario correctly, since
unicode code points and cells on the screen don't have any straightforward
correspondence. It works in some languages, but the same can be achieved by
calculating the necessary padding ahead of time and adding "%*s" with a width
argument and an empty string, which is a minor inconvenience at worst.
Other changes include general combing over the code and making it less
verbose by strategic utilization of added functions and a TRY() macro,
which some may recognize as being inspired by Rust error handling.
Also got rid of str_decode() in parsing the format string, since its
entirely unnecessary and just makes the parsing uglier.
Additionally, the implementation now only uses byte output.
Most consumers don't get any benefit from being served wide characters,
and there's almost no prints that output them.