Relation between pole and running masses of heavy quarks using the principle of maximum conformality