utils: Add uninterrupted_write()

This function lets us transparently handle EAGAIN/EINTR during writes
by retrying, which we want to do any time they pop up. This also has the
added benefit of silencing warnings about unchecked returns for write
calls, in addition to actually checking the return and logging a message
if something goes horribly wrong, which should make debugging easier in
the future.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
Merge pull request #76 from catharsis/handle-write-intrs

utils: Add uninterrupted_write()