[composer] Fix page orientation and size ignored when printing

Turns out QPrinter::setPaperSize silently flips the width and height
of a page if the printer orientation is set to landscape. So, make sure
we manually set the orientation to portrait before setting the page size
so that we can be sure the QPrinter is set to the correct page size.

This also restores the 2.4 behaviour where users could override
printed page size in the printer properties dialog (but only if
no data defined page size settings are active).

(fix #11352)