The nationwide blackout came two weeks after the Taliban shut down the internet in half a dozen provinces, saying they wanted to prevent “immoral acts.”