A target magnet system for a muon collider and neutrino factory