Add [Serializable] to X509Certificate2 (added in .NET 4.0) [#12457]
[System]: Make ServicePointManager hash on the proxy as well as uri and use_connect.

This fixes #12640.