[screenshots] Allow screenshots to be rotated

This helps when the application is not in the device's default orientation.

Implementing this also involved changing the snapshot to be a QImage
instead of a QPixmap. This is ok since Qt used to do that conversion
internally to save the pixmap anyway.