The grandsons of Queen Elizabeth II and their wives appeared together for the first time in two years outside Windsor Castle to greet mourners.