Android thread input

Wrote threaded input for Android.
It needs to be tested more extensively first as it's a pretty large modification.
It could potentially fix the Application Not Responding issues that some people have been reporting.