add some posix wrapper classes
don't retry POSIX close() on EINTR

See various discussion on the web, e.g.:

- http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-broken.html
- http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
- https://news.ycombinator.com/item?id=3363819

Or search the web for 'close' and 'eintr'