Fix JS tests on SpiderMonkey 60

It turns out the infinite loop can now run fast enough that we exhaust
the stack space in a given couchjs process. This ends up leaving a
couchjs process that can't be used for other things as the `map_results`
buffer doesn't get reset inbetween calls.
4 files changed