* call BZ2_bzWriteClose after fail
* set closed file handles to NULL
* move fclose after BZ2_bzWriteClose
old-commit-hash: 434a2b06584652ef82b393fcbc2986b598736030
* sentinel WIP
* logger is now a cc, not a c
* simpler code doesn't touch loggerd.cc
* oops, double lock. and logreader is nicer
old-commit-hash: 2f2b85581c1e2f6a770580b2db88a5e71f5a697a