James Lapine's book shows how he and Stephen Sondheim invested two years of work to burnish their musical from an avant-garde near-disaster to a mainstream classic.