Move all metrics related code out of `queryTypes/search.js` into a new file `queryTypes/metrics.js`

Regular searches need not be concerned with metrics code.