Former New Zealand prime minister says memoir aimed at ‘anyone who has ever doubted themselves’