stdio: Null-terminate snprintf output
uart: Return error if write fails
strtol: Initial commit

We define these ourselves as linking against newlib's definitions leads
to a 1kB impure_data global being brought in to the image.