Added Task.WaitForResult extension method.