Optimizing the resolution of the alternating-gradient m/μ selector