Almost 50 pro-democracy activists have been jailed in Hong Kong after a landmark national security trial that has drawn international condemnation.