-Fix [FS#5972]: [OSX] Implement more of the text editing API to prevent crashes and improve IME support.

git-svn-id: svn://svn.openttd.org@26758 6aa0318a-3be1-0310-93fa-89fd2396df07