Cosmological models in a Kaluza-Klein theory with variable rest mass