Multicolour paths in graphs: NP-hardness, algorithms, and applications on routing in WDM networks