Phases of QCD at nonzero isospin and strangeness chemical potentials with application to pion stars