clean up the extracted certificate

the certificate extracted in the above way will contain some junk
from openssl s_client output we don't want like verification status
we can remove it ro reduce disk usage for saved certificates
don't retry protocols we know don't work

When connection is unsuccessful with a given protocol, don't try it again
since we probably exhausted the ciphers supported by the protocol

makes scanning about 10% faster
no need to grep the input when we're using awk

awk has an inbuilt version of grep, also truncate processing as soon
as we find what we're looking for
don't calculate sha sums for the certificates over and over

we can use cksum to calculate simple checksum much faster than
with using openssl, so we can compute sums only once
few less forks in the script

again, we can use arrays and a bit advanced awk syntax to reduce
the number of forks necessary to run the script