replace `hasMQ()` with `normalizeQuery()`

Added a new function `normalizeQuery()`, which is responsible
for cleaning the `req.query` object of any incorrect media
queries.