code: function collectionLookup (collection, query) {
  	const id = createID(query.pattern, query.language);
  	log(`collectionLookup: querying for ${id}`);
  	return collection.find({_id: id}, {result: 1}).toArray()
  		.then(
  			(docs) => {
  				log(`collectionLookup: Got ${docs.length} docs`);
  				if (docs.length === 0) {
  					log(`collectionLookup ${createID(query.pattern, query.language)}: no results`);
  					return Promise.resolve(PATTERN_UNKNOWN);
  				} else if (docs.length === 1) {
  					log(`collectionLookup ${query.pattern}-${query.language}: result: ${docs[0].result}`);
  					return Promise.resolve(docs[0]);
  				} else {
  					log(`collectionLookup unexpected multiple match: ${jsonStringify(docs)}`);
  					return Promise.resolve(PATTERN_UNKNOWN);
  				}
  			},
  			(e) => {
  				log(`collectionLookup error: ${e}`);
  				return Promise.resolve(PATTERN_UNKNOWN);
  			}
  		);
  }
docs: Helper for isVulnerable. Returns a Promise that resolves to one of the PATTERN_X results.