Proximate and ultimate mechanisms of nestmate recognition in ants