Merge pull request #1484 from cloudant/fix-stats-reducer-for-array

Fix _stats reducer when map function emits array