Luminosity and mass functions of the three main sequences of the globular cluster NGC 2808