Richard J. Whalen, the author of a best-selling biography of political patriarch Joseph P. Kennedy who later served as a speechwriter on Richard M. Nixon’s 1968 presidential campaign but quit after becoming disillusioned with the candidate, died July 18.