UK police are investigating how an ex-Meta engineer used a secret script to download the private photos of Facebook users.