A Hong Kong court has handed 45 pro-democracy activists sentences of up to 10 years in jail for conspiracy to commit subversion.