Fixed segfault.
Don't call onLocationChanged if not needed.

We can handle the attachment issues separately without confusing other
components which rely on onLocationChanged being called only if the
location actually has changed.
Only connect signals if we can react to them.

There's no point in listening to signals that we can't react to anyway.
Fix issue with randomized idle animation.

We want the idle animations to be started at a random position, so that
if the screen is filled with entities of the same sort (like human
characters) we won't get the same animation for all of them at the same
time.
This however didn't work with the delayed model loading that we now
employ. The issue was fixed by moving the randomizing call to the proper
location when the model representation is initialized after the model
has been properly and fully loaded.
Clear tickets when resetting.
Avoid expensive lookup if possible.

Doing "setMaterialName" is pretty expensive since a look needs to be
done. Avoid if possible.