Palin Signs Deal to Write a Memoir