InputText: Fixed several issues
- Fixed lots of handle leak caused by Threading. Now uses ThreadPool instead of Thread. This change may fix IME issue that cannot input character like Japanese for instance.
- Commented out some non-used part.
- Removed ref keyword from ScanAndReplace().