China has passed a major new privacy law, in an effort to curb the power of big tech firms operating in the country.