fixed critical bugs causing random protocol errors


1) Fixed CRITICAL bug in the buffermanagement which would cause random protocol error when the server is under full load 

2) Fixed fatal error in buffer management which could cause buffers to be used more than once at the time resulting in strange protocol errors.

3) Refactored SSLSocketChannel2 (a little)