Chemical communication and collective behaviour in social and gregarious insects