The bright end of the infrared luminosity functions and the abundance of hyperluminous infrared galaxies