MongodDB MapReduce function used to join several collections