JM Barrie may have written Peter Pan a full ten years before the First World War but the analogy was prescient. Later, the author mourned the tragic loss