JK Rowling describes hitting 'rock bottom' in a new book about the benefits of failure