bug/002: emergency_write returns # of bytes output
bug/002: emergency_write returns # of bytes output

This makes it more like other I/O writing functions, and will make it possible
to use it in extreme-event handlers like ENOMEM.

adrianratnapala/elm0,adrianratnapala/elm0,adrianratnapala/elm0