American and Iranian diplomats in Vienna Monday discussed military cooperation for dealing with ISIS’s advances in Iraq and averting its disintegration.