Collective Visual Detection in Animal Groups