Application of the principle of maximum conformality to top-pair production