from trunk: expose bufferevent_setwatermark via header files and fix high watermark on read svn:r730