Spyware was used against Catalan targets and UK prime minister and Foreign Office