UK police used anti-terror legislation to uncover journalists’ sources