JavaScript: Mastering Asynchronous Reduce