[MAC] add missing cursor position and selection support to TextEntryBackend

This PR adds #334 for Mac.