In order to retrieve the correct set of TLS information, previously
pinfo->curr_layer_num was used. However, this is not a stable
identifier between the first and later passes, as subdissectors that
couldn't dissect data due to fragmentation on the first pass aren't
called on later passes.
To fix issue #16109, the layer number wasn't used at all, which did
break TLS over TLS.
We now have pinfo->curr_proto_layer_num which specifically counts
the number of layers of the current protocol instead of the total
number of layers; using that instead fixes TLS within TLS (in most
situations; some very rare cases, e.g. DVB baseband frames with
multiple TCP PDUs, which might be from the same or from different
TCP connections, might not work, but those don't work currently either)
while not reopening #16109.
Add tests for both cases, the one fixed by the other workaround and
for TLS over TLS.
As noted in the comments to #16109, there are other dissectors that
use curr_layer_num that might break in some cases because it's not stable.
Fix#17977.