Fix crashes in InstanceCache.
Fix crashes in InstanceCache.

Also expire cache after getting entry in GetOrAdd(). This prevents premature entry expiration while trying to get it.

rokups/Urho3D,rokups/Urho3D,rokups/Urho3D,rokups/Urho3D,rokups/Urho3D,rokups/Urho3D