Ferromagnetism and possible application in spintronics of transition-metal-doped ZnO films