bug 39483. Also, eliminate a warning about calling an undeclared function by including the header file.
CERT_CertChainFromCert in ssl_DupSocket(). This is MUCH faster. This is the first approximation of the right fix. The next step is to consider doing ref counting instead of actual duplication. Fixes bug 51425 .