Work around UIAutomation typeString bug in older versions of iOS

Implements a work around for a bug in UIAutomation that causes
the keyboard's typeString (JavaScript) method to fail after the
first character on older versions of iOS.  For iOS 6 and later
we can use typeString in a very natural way, but for older versions
we must break up the string to be typed and execute typeString
multiple times, once per character.