Saudi Prince Alwaleed - believed to be among the richest men in the world - made a deal with the Riyadh government to end his prolonged detention.