Next-to-leading order thermal photon production in a weakly coupled quark-gluon plasma