Pakistan's highest court ordered the release of Zaki-ur-Rehman Lakhvi, the alleged mastermind behind the 2008 Mumbai attacks, calling his detention illegal.