Algebraic independence of periods and logarithms of Drinfeld modules (with an appendix by Brian Conrad)