mg_vmprintf() returns io.buf from a mg_iobuf that starts empty. When the
internal mg_iobuf_resize() allocation fails, the buffer is left NULL and
mg_vmprintf() returns NULL. mg_file_printf() passed that result straight
to strlen(data), dereferencing NULL on allocation failure.
Skip the write when mg_vmprintf() returns NULL and return false, matching
how the rest of the codebase checks mg_calloc()/allocation results.