Nepal’s ex-prime minister released from custody