Exclusive: Edward Snowden papers show UK spy agency fears legal challenge if scale of surveillance is made public