Optimize SslHandler.unwrap() so that it doesn't produce unnecessarily many buffers

- Adapted from 4c7fa950cc4f4c52eeaae5887335b1f3047592f8
- Related issue: #1905