A Pakistani court convicted former Prime Minister Imran Khan of revealing official secrets on Tuesday and sentenced him to 10 years - the latest in a slew of legal cases that supporters say are meant to sideline the imprisoned politician just days ahead of parliamentary elections.