buffer: return offset for end of last write

Users asked to have `Buffer#write*` methods return last offset. Now the do.

Fixes #3597