[TPL] Add mono internal API support

Without the atomic boolean, System.Net.WebClientTest.UploadFileAsyncContentType would fail. The failure would be as follow : WebRequest.GetRequestStreamAsync would be called at some point, itself calling Task<Stream>.Factory.FromAsync (BeginGetRequestStream, EndGetRequestStream, null), but EndGetRequestStream would never be called because SimpleAsyncResult.CompletedSynchronously (the type of asyncResult and iar), would return true in the callback line 997, but false at line 1000, meaning that EndGetRequestStream would never be called.

Our implementation uses this AtomicBoolean, to make sure that we, first of all, call the endFunction/endAction only once, and second of all that we actually call it.