Fixes rounding of dirty rects and MBRs

We want the areas of the screen that we clear and clip to have integer coordinates.  Prior to this patch there were some cases that were not caught.  The solution is to do this "rounding up" of regions directly before we use them, rather than as they are created.

Similarly, the MBRs used should have integer coordinates.  This fixes a regression that caused them to be "rounded down" in some cases, and also special cases rotations of 90 degrees.   Previously, taking (say) the cosine of PI/2 resulted in a very small nonzero value, which due to rounding caused some deviations from an ideal 90 degree rotation.

This seems worth special-casing due to the privileged nature of 90 degree rotations.
Merge pull request #550 from starwed/rounding-fix

Fixes rounding of dirty rects and MBRs