Carry the accumulator through the foldl correctly

BugzID: 24365
Merge pull request #128 from cloudant/24365-reduce-keys-streaming-breakage

Carry the accumulator through the foldl correctly

BugzID: 24365