Fixed libprocess to pipe all close()s through os::close().

Review: https://reviews.apache.org/r/11184
Fixed mesos to pipe all close()s through os::close().

Review: https://reviews.apache.org/r/11185