Pion production in nucleon-nucleon collisions in chiral effective field theory: Next-to-next-to-leading order contributions