Cancers should be classed by similarities in tumour types, not by where they are formed, a study says.