CSHARP-1084: mono doesn't like enum.HasFlag, so removing all uses of it from code.
fixed issue where mono doesn't support DnsEndPoint in Socket.BeginConnect.
fixed issue with Mono where DnsEndPoint.Equals throw a null reference exception when comparing a different type of endpoint.
fixed timing issue with a flaky test in mono.
fixed issue where mono treats empty X509 certificates differently than .NET.