The PTI, the party of jailed former prime minister Imran Khan, won the most seats of any one party – but fell short of reaching the threshold for a majority government.