Social context predicts recognition systems in ant queens