The ACS Virgo Cluster Survey. XII. The Luminosity Function of Globular Clusters in Early-Type Galaxies