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
MAINT: put more classes back into the scipy.stats.distributions namespace
MAINT: attempt py3 compatibility fix
MAINT: move redundant code into a function
MAINT: add code comment and make a small code change
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