Fix browser capabilities compatibility with ms.net by 1) Avoid issues with capabilities defined with same name, but diferent case. and 2) favor majorversion/minorversion capabilities, but fallback to majorver/minorver if not found, to preserve compatibility with previous versions.
See Reported Bug #4786 in bugzilla which this attempts to resolve (and seems to succesfully).

This is a one line change:  result = null; had to be set before going back to the 'retry' point in GetConnection..

This is/should-be safe because we had just disconnected result a few lines earlier.

Without this change, under certain conditions which would flag a retry, when it went to the retry point
it wouldn't reset 'result', and as a result the main loop at the top of the GetConnection() function would
be skipped (it has -- while (result == null) -- at the retry point, and it would always be not null when it reached
that on retry), after which point it would just continue to retry on the same result indefinitely, which would eventually
result in an exception being raised.
This is the addition of a quick and dirty NUnit test for Bug 4786

This bug was fixed in another commit/push by Robert Wilkens (me).
This NUnit test will fail without the patch (It will raise a
NullReferenceException from within mono), but with the patch for that
bug it will not raise an exception and the test will exit cleanly.

Please note, the top of this patch source sets up a temporary network
socket to listen to a port which pool.GetConnection() simply tries to connect
to.  No data is transfered so nothing needed to be done other than to
call Listen() on that socket which was bound to the port.  If the listen fails,
it means something else is listening already, which is fine, so we ignore
any excpetions from this part of the code (catch and ignore).
This is a minor change to earlier commit which removes a commented out
sql server that should not have been there.  It changes nothing functionally,
but the server is a temporary server, so referencing it didn't make sense.
Force disposal of Sqlite commands with using-statements in order to better isolate the unit tests.
Merge pull request #292 from QuickJack/master

Remaining changes of my corrupted change request #247
Removed code commented
Fix XML serialization of DateTimeOffset?. Fixes #3258

The nullable DateTimeOffset was not properly handled when serialized.
The deserialization changed to work with DateTimeOffset?.
Avoided "i:type" attribute when serializing Nullable type.
Added unit test for the bug #3258 (Serialize|Deserialize DateTimeOffset?)
[System.Net.WebRequest] Implemented new and improved proxy support on Mac/iOS
WebRequest.GetDefaultWebProxy() must not assume the type of the system proxy.
[MacProxy] Fixed refcounting and got rid of unneeded attribute flags
BinaryWriter.Dispose is needed in Profile[1-4] of the Portable Class Libraries. Fix bug #4871
Thread.Finalize is needed in Profile3 of the Portable Class Libraries.
Small adjustments needed for Profile[1-4] of the Portable Class Libraries.
Added call to GC.SupressFinalize() in CFObject.Dispose()
Include config.h and use TARGET_X86 and TARGET_AMD64 instead of i386 and __x86_64__.
Fix race condition in mono_threads_CreateThread.
Merge pull request #294 from madewokherd/createsuspended

Fix race condition in mono_threads_CreateThread.
Stop at catch clauses when doing a step over in sdb. Fixes #4851.