[RDY] Non-unix-specific os_unix function. 

I noticed that `mch_write()` looked just a stone's throw from being OS-independent. Posting early to see if anyone can point out a flaw in my logic.

A few other functions in `os_unix.c` don't really depend on unix, like `mch_init()`, so I plan to add more to this.
@splinterofchaos I think I remember seeing a discussion about this elsewhere, but could you include the reason for adding this in the commit message? What problem did it fix?