Nepal's former prime minister Sher Bahadur Deuba and his Cabinet minister Prakash Man Singh have been set free.