Evolutionary design of photometric systems and its application to Gaia