An analytic set-valued selection and its applications to the corona theorem, to polynomial hulls and joint spectra