ENH: avoid repeated matrix inverse

The `sum_cov` term doesn't change, so it's faster to use a factorized version and solve.
BUG: use correct MAXGAM in beta.c

AFAICT the correct constant is used everywhere in cephes.

Also try harder to use the best order of operations when
calculating beta from gammas.
BUG: don't try to calculate beta in betainc, just call it.

fixes gh-3761
BUG: Fix lombscargle ZeroDivisionError

Change calculation of tau to use atan2 function instead of atan.

closes gh-3787
MAINT: update copyright notice to 2014.
MAINT: fix reST errors in integrate.quad docstring.
BUG: fix issue in scipy.special tutorial example.  Closes gh-3784.

Thanks to @CraigVD for reporting and suggestion a fix.

[ci skip]
Merge pull request #3791 from rgommers/doc-maint

Some maintenance for doc builds
Merge pull request #3788 from Jacobcvt12/lombscargle-atan

BUG: Fix lombscargle ZeroDivisionError
TST: lombscargle regression test related to atan vs atan2
MAINT: put more classes back into the scipy.stats.distributions namespace
MAINT: attempt py3 compatibility fix
Merge pull request #3803 from argriffing/lombscargle-atan2-test

TST: lombscargle regression test related to atan vs atan2
MAINT: move redundant code into a function
MAINT: add code comment and make a small code change
BUG: numpy version checking in ndimage
Merge pull request #3806 from argriffing/ndimage-numpy-version

BUG: numpy version checking in ndimage
Merge pull request #3804 from argriffing/stats-gen-api

MAINT: put more classes back into the scipy.stats.distributions namespace
Merge pull request #3779 from ewmoore/incbet_fix

BUG: special: fix overflow problems in betainc, and improve precision of beta

Fixes gh-3761
Merge pull request #3769 from perimosocordiae/patch-5

ENH: avoid repeated matrix inverse