For Stephen Sondheim, musicals were Rubik’s Cubes to be solved. But, when he wasn’t writing “Company” or “Sweeney Todd” or “Into the Woods,” he liked to craft cryptic crosswords and elaborate treasure ...