snprintf() return value changes

It's helpful for snprintf() to return 0, instead of an error code, when
it does no work.  A common pattern is something like:

	len = 0;
	len += snprintf(buf + len, bufsz - len, "whatever");
	len += snprintf(buf + len, bufsz - len, "overflowed buf");
	len += snprintf(buf + len, bufsz - len, "used to error");
	len += snprintf(buf + len, bufsz - len, "and more text");

Once bufsz - len == 0, such as after the "overflow" print, future
snprintfs now return 0, and are basically nops.  Previously, the
snprintfs that error out would return a negative value, actually setting
length back slightly, allowing "and more text" to clobber a bit.

Additionally, the usual snprintf returns how many characters we
processed, regardless of whether or not we wrote them.  This is
unsuitable for marking progress through a buffer.  Now, we return how
many characters we wrote.

The current semantics: snprintf forces a null termination of the string,
but does not count that in the return value (similar to strlen()).  The
return value is the number of characters written.  If a buf has n bytes,
n-1 is the max return value, with the nth byte being set to 0.

This is a little different than normal snprintf, but is more useful for
our series-of-snprintfs pattern.  If we change it back, we'll need to be
careful of the signs of bufsz and len to make sure we don't pass in
large unsigned values and accidentally trigger a huge printf.
trace_printk()

trace_printk() will drop lines of formatted text into the trace buffer,
up to a limited size.

A couple things to note.
- The trace buffer prints syscalls as the complete, not when they start.
  If you have some trace prints from a syscalls execution, they will
  show up before the syscall entry
- If you have a trace print, it will always kmalloc and build the trace.
  We don't have controls (yet) for globally disabling any prints.  I
  didn't bother coupling it to the "trace" monitor commands, opting to
  wait to control it via #K.  Might not even be necessary, since these
  are for debugging.
- If kprof is not attached, the traces aren't saved (or accessible).
- I'd like it if we could use all traces as extra_data blobs, so we just
  pass the pointer to a block in the queue, instead of copying
  everything.  Not a big deal though.