move gjoll_buf_t functions in buf.c