Fix calculation of remaining space on a page

The last row on a page (perhaps inside an area) can be less than the
full row height if the remainder of page height / rows heights is not 0.
In this case (last row) we need subtract the difference of the page height
and the row heights (overshoot). Otherwise we calculate with a larger
page than we have. In some border cases (for example a table using the
last few bits on the page) this can lead to unplacable boxes which
get pushed to the next page.