Fix memory leak in promise loop by breaking the recursion

It turns out that neither bluebird nor the native Promise implementation in v8
actually perform TCO when a promise is returned. This built up a long chain of
promise references in memory while dumping millions of wikipedia articles. The
dump would suceed, but for enwiki at least at the end the dumper would use >1G
of heap.

Since nextTick and its siblings setInterval and setTimeout are all pretty
expensive, we only break the chain occasionally. In local tests this
construct runs 70000000 iterations in constant memory, while the same loop
would exhaust the default 2G heap limit.