Pakistan's parliament has passed a bill granting the government sweeping controls on social media platforms. Critics say the law is aimed at curbing press freedom.