Work directly with TextFlow's TextLayout.

Use reflection to invoke TextFlow's private method to get its TextLayout.
This enables to work around
https://javafx-jira.kenai.com/browse/RT-32398
and also simplifies calculation of caret shape and selectio shape.