ENH: speed up scipy.stats.chisquare

My colleague found out that `scipy.stats.chisquare` is slow for large arrays. This version is about 4× faster according to

    python -m timeit -s 'import numpy as np
                         from scipy.stats import chisquare
                         A = np.random.random([29, 90000])' 'chisquare(A)'