Added passWhen:sendError:
Add test that `-[RACMulticastConnection connect]` isn’t racy
Fix race condition when connecting to a multicast connection

Every connect caller gets the disposable now
Add missing import
Added try: & tryMap: Removed passWhen
Test case names for try: tryMap:
Remove the lock when connecting

Using an atomic compare and swap we can determine whether the caller should connect to source signal.
Use a serial disposable created at initialisation time so that connection is non blocking and connection can always return a disposable to callers, even if we aren’t connected yet.
Simplify the race condition test

This is the test from @kastiglione with the addition of a semaphore. Using the semaphore we ensure that the disposable is nil because of the bug we’re testing rather than nil because the block enqueued to the scheduler hasn’t run yet.
Style changes & Comparison against value rather than error
tryMap checks for nil return and error set byref
Documentation wording
Added test for completion, fixed whitespace/indentation
Removed __autoreleasing from tests
Swap `willNot` with `notTo` because the semaphore prior waits
Replace the semaphore test with a condition lock

This allows stepped execution of the test and doesn’t introduce a racy test to test a race condition
Fix ownership race condition when swapping disposables

In `RACSerialDisposable` the compare and swap loop only took ownership after the swap was successful. This leaves an opportunity for another thread to come in and perform a subsequent swap, and `CFBridgingRelease` the value that the first thread swapped in, before the first thread has finished retaining the value.

Instead, retain the disposable before performing the swap, and release it in the event that the swap fails.

This would be extremely hard to test because our tests target is ARC and is inserting retains of the arguments.
Test connect race with dispatch group and atomic flag
Rearrange atomic checks to remove race
Semaphores revealed
Remove atomic flag