A new book chronicle's the late musical theater legend's passion for puzzles and games, and how it influenced his life and work.