In remote corner of Iraq, an unlikely alliance forms against Islamic State