The discovery of illegal surveillance of a left-wing party brings into question the prime minister’s friendship with the party’s spokeswoman as well as her faith in her own minister of justice.