A huge trove of documents on GitHub appeared to outline in extraordinary detail the scope of China’s state-sponsored cyberattacks on foreign governments, transfixing the global security community.