On the evolution of the gamma- and X-ray luminosities of pulsar windnebulae