Protests against corruption and inequality in the Himalayan nation exploded—and resulted in the Prime Minister’s resignation—after a hamfisted social-media ban.