Petr Pavel, a retired army general, has decisively defeated populist billionaire Andrej Babis to become the Czech Republic's new president.