Improve ordering of media queries

I know (hope) this is a rather rare issue but I need it in a project that has a print layout with lots of styles from all kinds of media queries. I detected a bug when working with media queries that are considered for print and screen combined with a (min|max)-(width|height) e.g.:

```css
@media print, only screen and (min-width: 60em) { }
```
These were immediately detected as print and put at the end of the file without being sorted. I think the first thing to look for should always be (min|max)-(width|height). I also added a function to sort the (min|max)-(width|height) queries with the same values depending on the keyword print.

There is a test file (test7.css) that demonstrates this.

Cheers,
Daniel