During World War I, the American novelist of high society transformed herself into a pioneering frontline reporter