Fix possible race condition in C4ParticleSystem construction

Previously, the calculation thread was initialized before the event it was
going to wait for after it is launched. However, since the thread starts its
execution in its constructor, it might access the event before the event
itself has been constructed.

This is fixed by making sure the event is fully constructed before the thread
is constructed (and launched).
Extracted skeleton from StdMesh.

Skeleton is now represented by the class StdMeshSkeleton.
AttachMesh with added functionality (#1177)

Simple implementation of matching skeletons/animations. Short description added to the documentation. More functionality to follow.
Merge remote-tracking branch 'origin/master'
Merge branch 'master' into learning_branch
Map bones of matching skeletons.

AM_MatchSkeleton now applies the transformation of bones with the same names only. Issues I had: Wanted to create a constant -1 for the invalid index to avoid "magic numbers". Wanted to create a more effective mapping loop: Have a list with the parent bones, remove bone if it matches the child bone name.