Gunman wounds three officers, is shot dead in New Mexico