refactor buffer:

rename `buffer' to `buf' in buffer.c
implement basic interfaces of rope buffer
add test for rope based buffer