add netstring_read_bufferevent function and tests