MAINT: stats: Simplified the calculation of Pearson's R.

* Removed the common factor 'n' from the numerator and denominator in
  the calculation of Pearson's R.  (Closes the issue gh-2512.)
* Added basic tests of pearsonr. (All the existing tests were for perfect
  correlation or anticorrelation.)
* Modified stats.mstats.pearsonr to not raise RuntimeWarnings when abs(r) == 1.
Merge pull request #2556 from WarrenWeckesser/stats-pearsonr-calc

MAINT: stats: Simplified the calculation of Pearson's R.