add expand to nbuffer.
1. remove nbuffer_mark & nbuffer_reset, because this is conflict with rewind using 'mark'.
2. add nbuffer_require to auto-expand nbuffer capacity.