A suspected police corruption case became real-life Line of Duty. Mandy McAuley investigates how, after the case collapsed, failings were exposed in secret surveillance.