Iraq's bid to rein in Iran-linked militias becomes key test of US ties