An Australian student who was detained in North Korea has been released and has safely left the country, Prime Minister Scott Morrison said on Thursday.