Homoclinic and heteroclinic chaos in a single-mode laser.