Add callback in AI logic for joining AI to player's group

The call for joining AI unit to player group used to be server side, but
this was giving problems, where the unit side was not automatically
switched to the sid eof the group leader. This change makes it so that
the call for joining the AI unit to the player group is done client-side