[TIMOB-11178]Replacing ENSURE_UI_THREAD with TiThreading