tls_wrap: fix small obvious memory leak

Signed-off-by: Fedor Indutny <fedor@indutny.com>
tls_wrap: fix interleaving in InvokeQueued

WriteItem callback may add new item to the `pending_write_items`. Ensure
that this item won't be called in the same `InvokeQueued` call, as it
may result in way-to-early `finish` event on js-side.

fix #7733

Signed-off-by: Fedor Indutny <fedor@indutny.com>