Julian Assange has been freed from prison and is expected to plead guilty to a single US felony charge, in what could spell the end to a years-long saga that has spanned continents and seen him hailed as a champion of press freedom and a threat to national security.