BROADWAY Stephen Sondheim: ''Merrily We Roll Along.'' Original Cast Album. RCA Red Seal CBL1-4197. - This Hal Prince-directed show, with songs and lyrics by Stephen Sondheim, flopped on Broadway. It suffered, from all reports, from a weak book and casting problems. But these had no effect on this recording. In fact, this album - one of the finest productions of an original cast album of recent history - shows us a score at once sophisticated, poignant, bitter, and structurally innovative. There has not been a score to touch it of late, as the tawdry album of the equally tawdry ''Dreamgirls'' (an SRO hit on Broadway), vividly demonstrates. Even if ''Merrily'' will be entered in the written chronicles as a failure, this album will be an aural document of yet another landmark in the apparently endless line of Sondheim scores that say something new in inventive, different ways each time. - Thor Eckert Jr.