US forces prepare to leave Iraq, as Iran-backed groups celebrate while security officials warn of renewed Islamic State threats.