TextInput: add a workaround that for a bug in some versions of android

Workaround for a bug in android 4.1 where using the maxlength attribute can cause the field to freeze up completely and break it. https://code.google.com/p/android/issues/detail?id=35264
I am not sure about when this bug got fixed, but an upper limit on the version detection should maybe be added.