move pending buffer accounting to AbstractChannel in order to fix writab...

...ility callback

test case for writability callback / reentrancy