Fix test failures in CertificateValidationClientServer_EndToEnd_Ok (dotnet/corefx#35225)
This System.Net.Security Functional test was always failing on my machine.
But not failing in CI. The reason is that the CI machines don't have the
TestRoot certificate installed but my machine does.
So `Capability.IsTrustedRootCertificateInstalled()` is always false on the
CI machines but true on my machine.
Due to this test almost never running that codepath, the test got bad due to
some prior refactoring and the failure wasn't noticed until now. The test was
making an incorrect assumption about the contents and sizes of certificate
collections.
I fixed the test so that it validates what it should have been doing all along.
The validation is about checking that the received/built trusted chain is valid
and that the end-entity certificate is on that chain and is trusted by the root
on that chain.
Commit migrated from https://github.com/dotnet/corefx/commit/
224fa8e1e58b10b7fe1a5d3cfdedf2a1afbfe2e1