The King's Coronation and Queen Elizabeth II's funeral were among the most-watched TV events of the decade so far, according to official viewing figures.