A Pakistani anti-corruption court has jailed former Prime Minister Nawaz Sharif for seven years on corruption charges.