Make IsCompleted check thread-safe.

IsCompleted check in @2329a9284a4d02e2e80d62b11410d8441bbc9fa9 didn't
lock the awaiter so concurrent access to it may escape this fail-fast
check.

Add an internal SyncRoot to SocketAwaiter and lock on it while checking
IsCompleted.
Add context synchronization to SocketAwaitable.

SocketAwaitable: Add public ShouldCaptureContext property for users to
signal whether they want context capturing.

SocketAwaiter:
* Add internal SyncContext property to allow getting and setting the
captured SynchronizationContext.

* Remove the setter of IsCompleted property and add a Complete method
that sets the isCompleted field to false and nullifies the SyncContext.

* Make both delegates that invoke the continuation to check
awaitable.ShouldCaptureContext first and use the captured context if it
is true. Also, make these delegates call the new Complete method to set
isCompleted to false and nullify the captured synchronization context.

SocketEx.OperateAsync:
* Capture the current context if the awaitable
argument's ShouldCaptureContext property is set to true.

* Replace a.IsCompleted = true parts to a.Complete().
Merge branch 'syncc' into next