O’Hagan was contracted to ghost write a memoir but the deal collapsed because Assange was 'mortified' by the idea of revealing his own secrets