The beheading of American journalist James Foley by ISIS militants has stirred grim memories, bringing into focus once again the risks faced by reporters in modern conflicts.