Population genetics of clonally transmissible cancers