Douglas, Robert, Moderator of the General Assembly of the Church of Scotland