Always draw midpoint handles within viewport (like #1840)

This is like #1840, but uses an intersection test to check the visible extent edges.  Also I pass drawMidpoints a slightly trimmed extent so that midpoints don't end up exactly on the edge of the screen, or within the ui bars.
Can you add a comment here that the magic numbers 40 and 70 are derived from the height of the header and footer?