US Defence Chief James Mattis says there are "more fights ahead" in Iraq as he visits Baghdad and meets with military leaders to discuss US involvement in the Middle East.