Makes testThatCancelAllHTTPOperationsWithMethodPathCancelsOnlyMatchingOperations and testThatCancelAllHTTPOperationsWithMethodPathDoesntCancelNotMatchingPaths thread safe.