The United Kingdom’s top spy agency is facing legal action following revelations published by The Intercept about its involvement in secret efforts to hack into computers on a massive scale.