Former prime minister Boris Johnson pulled out of the contest to become Britain's next leader on Sunday.