Measurement of quarkonium production cross sections in pp collisions at $\sqrt{s}=$ 13 TeV