Forty-five ex-politicians and activists have been sentenced to four to 10 years in prison in Hong Kong’s biggest national security case under a Beijing-imposed law that crushed a once-thriving pro-democracy movement.