Add main thread check.
Merge branch 'master' of https://github.com/urho3d/Urho3D