Sir Thomas Barlow (1845–1945), Physician to the King