battle_calcs.attack_rating: bug fix for when AI side has no leader

Check for AI side's leader's existence before trying to calculate
distance from leader.