Various fixes, mostly for FreeBSD
With this + !3 (closed) the tests pass on both Linux and FreeBSD.
Most of the commits are trivial fixes which don't have much impact outside of testing, except for Don't pass a pointer to fuse_file_info to the lambda in write
which fixes data corruption on writes.