The Herschel Virgo Cluster Survey. I. Luminosity function