#592
Support rotating log buffers
This series implements a circular buffer for buffering service log, providing a simple API to append to it, and another in-place API to linearize the buffer to be sent to external programs, etc. Only appending to the buffer when it doesn't reach the maximum size might involve memory allocation. The new append API introduces extra overhead of copying, but is much easier to use, with which related code is simplified.
For sake of simplicity, the first patch modifies service loading code, to reject log-buffer-size = 0 settings. This possibly breaks existing services, but I don't think such settings make much sense, since it means all output from the service would be discarded, which could (and IMO, should) be achieved by log-type = none.