(bug 43942) Skip screen sheets with media queries when printing

* Add test suite, with regression tests as well as tests for the fix.

Change-Id: I66d40673cc610370b66af0129412bc6495673f8d
Merge "(bug 43942) Skip screen sheets with media queries when printing"