Fix for text fitting when outside container boundaries

The text fitting algorithm was making the (reasonable sounding) assumption that the coordinates for the text to fit would be within the containing element (stack or frame). If that assumption was violated, we'd crash.

After some discussion on #659 we decided that the "right" behavior was to bump out and act like the text was within the parent container (or whichever ancestor would finally accommodate the desired position).

This PR puts that mechanism in place, along with a fallback if we still have a negative width (outside the app boundaries for instance?) so we don't crash.