[composer] Fix calculation of rotated image size inside picture items when rotation is 90 or 270 degrees
[composer] Prevent crash when loading project which contains no Grid elements (refs #10905)