Merge v0.10 into v1.x

R=@saghul

This breaks the fs_fstat test on Linux and only in the gyp build because neither _BSD_SOURCE, _SVID_SOURCE or _XOPEN_SOURCE seem to be defined.  Still investigating that.

```
$ out/Debug/run-tests fs_fstat fs_fstat
Assertion failed in ../test/test-fs.c on line 1081: s->st_atim.tv_nsec == t.st_atim.tv_nsec
Aborted (core dumped)
```